Skip to main content

Posts

Showing posts from April, 2014

Webgrid in MVC 4 razor

Hell everyone, I am going to share the code sample for how to use Add, Update and Delete in MVC WebGrid . If we need to display data in our app, we look for a asp.net grid view. The ASP.net Grid view is always perform to display all the data and other activities like add items, update items and delete items etc.  But in MVC, for the same we use MVC WebGrid control. The MVC WebGrid not have features to perform the operation like add, update and delete that time we need to put some extra work to achieve this functionality.  The code sample as given below. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 //MVC WebGrid control @model IEnumerable<MedC.Svc.Data.Doctor> <h4>Doctor List</h4> <p>      @Html.ActionLink( "Create New" , "Create" ) </p> @{      WebGrid grid = new WebGrid(Model, canPage: