J. Raoul FEZE
J. Raoul FEZE

Reputation: 47

Add a column to number the rows on a ListView

I am using a ListView to populate data and I would like to add a column that will number the rows. Is there a way to do it?

Upvotes: 0

Views: 307

Answers (1)

You can get the row number from the item index.

<td> <%# Container.DataItemIndex + 1%> </td>

Click here for an examle

Upvotes: 3

Related Questions