Thursday, August 9, 2012

Auto Generate Serial Number in GridView

To auto generate serial number in Gridview, which we can use only for display purpose and has nothing to do with database and data related operations.

  • Add Following Column in Grid View at first position

       
       <%# ((GridViewRow)Container).RowIndex + 1%>
   
 

Above code will simply autogenerate serial number in Gridview
Submit this story to DotNetKicks

1 comments:

Unknown October 19, 2012 at 5:28 PM  

This is quite simple, anyone new to ASP.NET Development will find this useful and will get the clear idea about how auto serial number is generated in GridView.