INTRODUCTIONIn this article, I am explain How to Display Data In Webgrid And Delete Multiple Rows By Using Checkboxes In MVC 5 Application.
CREATE NEW PROJECT.
Go to File > New > Project > Select asp.net web application (with .NET Framework 4.5) > Enter Application Name > Click OK > Select Empty MVC Template > OK
Add Entity data model.
In previous articles I explained how to add entity data model. here
ADD A NEW CONTROLLER.
Go to Solution Explorer > Right Click on Controllers folder form Solution Explorer > Add > MVC5 Controller- Empty > Enter Controller name Home > Add.
ADD NEW ACTION INTO YOUR CONTROLLER FOR DISPLAY DATA IN WEBGRID.
Here I have added "List" Action into "Home" Controller. write this following code.
ADD VIEW FOR for the LIST ACTION
Right Click on Action Method (here right click on form action) > Add View...
Rebuild solution before add view.
Write following code into List view.
ADD ANOTHER ACTION INTO YOUR CONTROLLER FOR DELETE MULTIPLE ROWS AT ONCE.
Here I have added "Delete" Action into "Home" Controller.
write this following code .
RUN APPLICATION(CTTL + F5).