public virtual OLVListItem GetNextItem(OLVListItem itemToFind)
{
if (this.ShowGroups) {
bool isFound = (itemToFind == null);
foreach (ListViewGroup group in this.Groups) {
foreach (OLVListItem olvi in group.Items) {
if (isFound)
return olvi;
isFound = (itemToFind == olvi);
}
}
return null;
}
if (this.GetItemCount() == 0)
return null;
if (itemToFind == null)
return this.GetItem(0);
if (itemToFind.Index == this.GetItemCount() - 1)
return null;
return this.GetItem(itemToFind.Index + 1);
}