Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: ASP.NET
Expertise: Intermediate
Sep 25, 2009

Displaying Row Numbers in a DataGrid

To display row numbers in an ASP.NET DataGrid, first create a template column and set its ItemTemplate value using the following code:

<asp:templatecolumn headertext="Row Number">
   <itemtemplate>
      <span><%# Container.ItemIndex+1 %></span>
   </itemtemplate>
</asp:templatecolumn>
Srinath MS
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap