asp.net mvc - How can i add checkbox in my webgrid in mvc 5 -
i want add checkbox in webgrid can tell me how can this? , tell me how can select checkbox , delete them. code:-
@{ var grid = new webgrid( model, rowsperpage: 5, defaultsort: "catagoryid", columnnames: new[] { "category_name", "parent_category_id", "category_desc", "isgenderapplicable", "isageapplicable", "isactive" } ); } @grid.gethtml( fillemptyrows: false, mode: webgridpagermodes.all, columns:grid.columns( grid.column("category_name", header: "catagory name"), grid.column("parent_category_id", header: "parant catid"), grid.column("category_desc", header: "description"), grid.column("isgenderapplicable", header: "gender application"), grid.column("isageapplicable", header:"age application"), grid.column("isactive", header: "active") ) )
add checkbox as:
grid.column(format: @<text><input name="chkbox" type="checkbox" value="some value" /></text>),
your second query: how can select checkbox ?
please refer blog: http://www.codeproject.com/questions/273164/mvc-checkbox-checked-rows-in-the-web-grid
Comments
Post a Comment