Add a Count Column to Your Gridview, Datalist or Repeater

Found this great article on how to add a counter column to your data rich controls.

http://www.lazyasscoder.com/AspNet/Article.aspx?id=55&title=How+To%3A+Add+a+row+count+column+to+a+GridView%2C+DataList+or+Repeater

The above article is specific to a GridView. Here is an example with a Repeater control.

<asp:Repeater ID="repeater" runat="server">
	<ItemTemplate>
		<%# Container.ItemIndex + 1 %>
		<%# Eval("field_name") %>'>
	</ItemTemplate>
</asp:Repeater>


Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Related Posts

Tags: , , , , ,

Leave a Reply





Donate

If you found this article useful and would like to see more like it this please consider making a donation.

Sponsors