Click here to Skip to main content
15,886,063 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
See more:
hi..

how to add auto increment column in gridview?
Posted
Updated 20-Aug-17 18:20pm
Comments
Siva Hyderabad 4-Apr-14 3:19am    
+4

XML
<Columns>
     <asp:TemplateField HeaderText="SNo">
     <ItemTemplate>
     <span>
     <%#Container.DataItemIndex + 1%>
     </span>
     </ItemTemplate>
     </asp:TemplateField>
<Columns>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900