public override void RefreshObjects(IList modelObjects)
{
if (this.InvokeRequired) {
this.Invoke((MethodInvoker)delegate { this.RefreshObjects(modelObjects); });
return;
}
// Without a data source, we can't do this.
if (this.VirtualListDataSource == null)
return;
try {
this.BeginUpdate();
this.ClearCachedInfo();
foreach (object modelObject in modelObjects) {
int index = this.VirtualListDataSource.GetObjectIndex(modelObject);
if (index >= 0)
this.RedrawItems(index, index, true);
}
}
finally {
this.EndUpdate();
}
}