Steps to reproduce:
1. Open RadOpenFileDialog.
2. Select items.
3. Remove an item from the "File name" autocomplete box.
To workaround:
RadAutoCompleteBox acb = openFileDialog.OpenFileDialogForm.Controls.Find("selectedFilesAutoCompleteBox", true)[0] as RadAutoCompleteBox;
acb.Items.CollectionChanged += this.Items_CollectionChanged;
private void Items_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
{
if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove)
{
ExplorerControl explorerControl = this.openFileDialog.OpenFileDialogForm.ExplorerControl;
List<ListViewDataItem> selecteditems = explorerControl.FileBrowserListView.SelectedItems.ToList();
foreach (RadTokenizedTextItem varItem in e.NewItems)
{
string strText = varItem.Text.Trim();
foreach (ListViewDataItem item in explorerControl.FileBrowserListView.SelectedItems)
{
if (item.Text == strText)
{
selecteditems.Remove(item);
}
}
}
explorerControl.FileBrowserListView.SelectedItems.Clear();
explorerControl.FileBrowserListView.Select(selecteditems.ToArray());
}
}
The achieved result is demonstrated in the attached gif file.