9CBS - Document Center - .NET title How to add automatic growth column for DataGrid Cuike519 (original) keyword DataGrid; Automatic growth column
How to add automatic growth columns to DataGrid I think we all know how to add self-growth columns in the database, we can make this self-growth column to the DataGrid make the user convenient to know the first few lines, today I introduce a use The database can simply display the method of growing column, some people may say that since the database supports us? I think two reasons: 1, not all the tables have self-growth columns. 2. The phenomenon of breaking is displayed when the self-growth column does not automatically copy, even if replication is possible. But first, this method is that this method can only display the serial number of the current page, that is, if there is a paging it can only mark the serial number of the current page. If you want to achieve a pagination, I want to use the database to be simpler than this method, because if you still use this method, you will have a status, here I don't consider this method, but I will give a database in the end of the article. solution. Ok, the following is a topic, first we need to place a DataGrid on the page. We use the Northwind database example: The DataGrid of the HTML page is as follows:
What should I do if we want a column starting from 0? We can change the below in