Reputation: 14998
I'm having a hard time coming up with a good way to number the items in my paginated ListView. The solution I was using prior to adding pagination worked fine, but now the numbering doesn't persist between pages. If the first page is 1-10, the next page will also be 1-10 and so on. Obviously, it should be 1-10, 11-21, etc.
Is there an easier way to add numbering to ListView items that I'm missing? What's the best way to do this?
Upvotes: 1
Views: 484
Reputation: 3881
Could you use something like this?
(PageIndex*PageSize)+ItemIndex
Upvotes: 0
Reputation: 18797
You can show ListViewItem.Index property. Note that it's zero-based.
http://msdn.microsoft.com/en-us/library/system.windows.forms.listviewitem.index.aspx
Upvotes: 2