Add AutoNumber to GridView showing the RowNumber | Quickie

The code below will add a column showing an incremental number near each row, which ultimately is the row number
<asp:TemplateField>
  <ItemTemplate>
    <%# Container.DataItemIndex + 1 %>
  </ItemTemplate>
</asp:TemplateField>
Hope this helped 😉

Hello, nice to meet you

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply