How to get the last row number of an 'ObjectListView'?
The last is just the number of items - 1 :
int nLastIndex = objectListView1.Items.Count - 1;
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear All,
How to get the last row number of an 'ObjectListView'? I search in Google and find the page http://objectlistview.sourceforge.net/cs/recipes.html#how-can-i-put-a-button-into-a-cell. In (52), I find the code as follows.
this.olv.ButtonClick += delegate(object sender, CellClickEventArgs e) {
Debug.WriteLine(String.Format("Button clicked: ({0}, {1}, {2})", e.RowIndex, e.SubItem, e.Model));
I also know there is a 'RowsPerPage' property.
Which one should I use, 'RowsPerpage' or 'delegate'? I have no knowledge of 'delegate'. If 'delegate' is the final answer, where to put it?
How to get the last row number of an 'ObjectListView'?
The last is just the number of items - 1 :
int nLastIndex = objectListView1.Items.Count - 1;