Categories
Uncategorized

Check Box in Webgrid MVC 3

Below is a simple demonstration on how to use checkbox inside a webgrid column in MVC 3. I had a field called ‘HasPassport’ in my model which was of type **boolean **for which I required a checkbox column, to show a checked checkbox for every true value and an unchecked checkbox otherwise. Using the WebGrid.Column’s […]

Categories
Uncategorized

Sorting / Paging two webgrid in MVC 3 Razor

When using two webgrids, you often must have come across a problem where sorting/paging on one webgrid will affect the sorting and paging on the other grid. Now lets assume you have already set canPage: true, canSort: true Below is a simple example of how you should use multiple webgrids to avoid this problem. string […]

Categories
Uncategorized

MVC 3 Web grid sorting not working

I recently was working a lot with Web Grids, and there was this was one problem that kept coming up again n again, so I have decided to write an article for this. Lets first see what my web grid code looked like when my sorting was NOT WORKING, var myGrid = new WebGrid(source: Model.ABC); […]

Categories
Uncategorized

WebGrid Paging with pager method in Razor MVC

I needed to add a paging option to my webGrid control, after doing a lot of googling I still could’nt find a proper written article for this. So I decided to write an article on this myslef. MVC Razor provides a pager method, details of which can be read at WebGrid.Pager Method Below is the […]