Friday, April 4, 2008

Insert / display row number in GridView

To insert row number in GridView -
<asp:TemplateField>
<ItemTemplate>
<%# Container.DataItemIndex + 1 %>
</ItemTemplate>
</asp:TemplateField>



<%# Container.DataItemIndex + 1 %>