boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Auto Increment Row Value In Asp.net MVC WebGrid

Updated on     Kisan Patel

Problem:

How to Implement row number in mvc3 webgrid along with paging?
How to display row number in MVC WebGrid?
How to Display Auto Increment Row Value In Asp.net MVC WebGrid Using C#.Net?

Solution:

If you want to display an index of the row independently of WebGrid then use below code:

grid.Column(header: "RowNumber", format: item => item.WebGrid.Rows.IndexOf(item) + 1)

But if you want to display an index of the row for whole data of WebGrid then use below code:

grid.Column(header: "Sr. No.",format: item => item.WebGrid.Rows.IndexOf(item) + 1 + Math.Round(Convert.ToDouble(grid.TotalRowCount / grid.PageCount) / grid.RowsPerPage) * grid.RowsPerPage * grid.PageIndex)

row-number-MVC-WebGrid


ASP.NET MVC

Leave a Reply