asp.net mvc - Sorting is not working in mvc MVCGrid.net -
i'm using mvcgrid.net grid show data data base. problem sort option not working here mvcgrid code
ienumerable<state> st = null; mvcgriddefinitiontable.add("stategrid", new mvcgridbuilder<state>() .withauthorizationtype(authorizationtype.allowanonymous) .addcolumns(cols => { cols.add("statecode").withsorting(false) .withvalueexpression(p => p.statecode); cols.add("statename").withheadertext("state name") .withvalueexpression(p => p.statename); }) .withsorting(true, "statename")
this old question, i'll tell helped me.
columndefaults coldefauls = new columndefaults() { enablesorting = true }; mvcgriddefinitiontable.add("stategrid", new mvcgridbuilder<state>(coldefauls) .withauthorizationtype(authorizationtype.allowanonymous) .addcolumns(cols => { cols.add("statecode").withsorting(false) .withvalueexpression(p => p.statecode); cols.add("statename").withheadertext("state name") .withvalueexpression(p => p.statename); }).withsorting(true, "statename")
Comments
Post a Comment