Geeks With Blogs
Daily dotnet {notes on codes}

Often we may need an auto incremental column for index on gridview, we can achieve this by adding a Template field:

<asp:TemplateField HeaderText="Index">
           <ItemTemplate>
                  <%# Container.DataItemIndex + 1 %>
            </ItemTemplate>
</asp:TemplateField>

Posted on Sunday, June 20, 2010 9:59 PM asp.net | Back to top


Comments on this post: Set Index Column to GridView

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Prasenjit | Powered by: GeeksWithBlogs.net