In this short article i will give you tips for removing shorting from header of the webgrid in an mvc application. For this we needed to just set the canShort=false while assigning the data source to webgrid. have a look the sample code below.
In my previous article i have shown you : How to Bind Data to Webgrid in ASP.net MVC Using C#.Net
In my previous article i have shown you : How to Bind Data to Webgrid in ASP.net MVC Using C#.Net
var grid = new WebGrid(Model.Studentmodel,canSort:false);
<div>
@grid.GetHtml(columns:
grid.Columns
(
grid.Column("ID", "Stud ID"),
grid.Column("Name", "Stud Name"),
grid.Column("Class", "Class"),
grid.Column("Section", "Section"),
grid.Column("Address", "Address")
), mode: WebGridPagerModes.Numeric)
</div>
|
In above code please check the blow mention line
var grid = new WebGrid(Model.Studentmodel,canSort:false);
0 comments:
Please let me know your view