You may notice in the below code we had incremented DataItemIndex by one ( 1 ), because the DataItemIndex property is the zero-based index, so to starts from one 1, we incremented it by one. Using DataItemIndex, i.e By adding code inside gridview you will get an auto-generated serial number. Serial number Sr no can be added by using DataItemIndex in Gridview control.ĭataItemIndex: Gets the index of the DataItem in the underlying DataSet. add or show auto-generated serial no (Sr no) as the first column in gridview control. This article will explain how to add or show auto increment the serial number.i.e. Overview: Adding an auto-generated serial number, show the first column as Sr no in Gridview asp.net.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |