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

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

Add the given collection of model objects to this control.

The added objects will appear in their correct sort position, if sorting is active. Otherwise, they will appear at the end of the list.

No check is performed to see if any of the objects are already in the ListView.

Null objects are silently ignored.

public AddObjects ( ICollection modelObjects ) : void
modelObjects ICollection A collection of model objects
Результат void
        public override void AddObjects(ICollection modelObjects)
        {
            if (this.VirtualListDataSource == null)
                return;

            // Give the world a chance to cancel or change the added objects
            ItemsAddingEventArgs args = new ItemsAddingEventArgs(modelObjects);
            this.OnItemsAdding(args);
            if (args.Canceled)
                return;

            try {
                this.BeginUpdate();
                this.VirtualListDataSource.AddObjects(args.ObjectsToAdd);
                this.BuildList();
            }
            finally {
                this.EndUpdate();
            }
        }