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

ModelToItem() public méthode

Return the OLVListItem that displays the given model object
This method has O(n) performance.
public ModelToItem ( object modelObject ) : OLVListItem
modelObject object The modelObject whose item is to be found
Résultat OLVListItem
        public virtual OLVListItem ModelToItem(object modelObject)
        {
            if (modelObject == null)
                return null;

            foreach (OLVListItem olvi in this.Items) {
                if (olvi.RowObject != null && olvi.RowObject.Equals(modelObject))
                    return olvi;
            }
            return null;
        }
ObjectListView