![]() ![]() Consequently, autonumber column values are generated as sequential row numbers The Merge method will add the rows of the source table to the destimation table one by one. Then the SourceTable is merged with the ResultTable. Then add a Data Column, AutoNumberColumn with auto incrementing behaviour. The function receives a DataTable as parameter. Refer on How to: Create an Autonumber DataColumn Private DataTable AutoNumberedTable( DataTable SourceTable)ĭataTable ResultTable = new DataTable () ĭataColumn AutoNumberColumn = new DataColumn () ĪutoNumberColumn.DataType = typeof ( int ) I have achieved this output by using the following function. ![]() The first column in Figure.1 displays sequential row numbers. How to add an autonumber column in a DataGridView control that is populated with a DataTable in simple steps ? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |