BrightIdeasSoftware.VirtualObjectListView.SelectObjects C# (CSharp) Метод

SelectObjects() публичный Метод

Select the rows that is displaying any of the given model object. All other rows are deselected.
This method has O(n) performance where n is the number of model objects passed. Do not use this to select all the rows in the list -- use SelectAll() for that.
public SelectObjects ( IList modelObjects ) : void
modelObjects IList A collection of model objects
Результат void
        public override void SelectObjects(IList modelObjects)
        {
            // Without a data source, we can't do this.
            if (this.VirtualListDataSource == null)
                return;

            this.SelectedIndices.Clear();

            if (modelObjects == null)
                return;

            foreach (object modelObject in modelObjects) {
                int index = this.VirtualListDataSource.GetObjectIndex(modelObject);
                if (index >= 0 && index < this.VirtualListSize)
                    this.SelectedIndices.Add(index);
            }
        }