BrightIdeasSoftware.ObjectListView.GetNthItemInDisplayOrder C# (CSharp) Méthode

GetNthItemInDisplayOrder() public méthode

Return the n'th item (0-based) in the order they are shown to the user. If the control is not grouped, the display order is the same as the sorted list order. But if the list is grouped, the display order is different.
public GetNthItemInDisplayOrder ( int n ) : OLVListItem
n int
Résultat OLVListItem
        public virtual OLVListItem GetNthItemInDisplayOrder(int n)
        {
            if (!this.ShowGroups)
                return this.GetItem(n);

            foreach (ListViewGroup group in this.Groups) {
                if (n < group.Items.Count)
                    return (OLVListItem)group.Items[n];

                n -= group.Items.Count;
            }

            return null;
        }
ObjectListView