Hi,
I derived my SelectAllComboEditor from your XamComboEditor to provide a "SelectAll" button in a ContextMenu to my users.
Unfortunately, the operation takes about 20 sec for 100 entries and about 3 min for 1000 entries.
How can I speed this up?
using System.Windows.Controls;using System.Windows.Input;using Infragistics.Controls.Editors;using Microsoft.Practices.ObjectBuilder2;using Workbench.Core.UI.Commands;
public class SelectAllComboEditor : XamComboEditor { protected override void OnMouseRightButtonDown(MouseButtonEventArgs e) { ContextMenu contextMenu = new ContextMenu();
MenuItem selectAll = new MenuItem { Header = "Select All", Command = SelectAllCommand };
contextMenu.Items.Add(selectAll); contextMenu.Items.Add(deselectAll);
contextMenu.IsOpen = true; }
public ICommand SelectAllCommand { get { return new RelayCommand((_) => { SelectAll(); }); } }
private void SelectAll() {
//slow operation Items.ForEach(x => x.IsSelected = true); }
}
<utils:SelectAllComboEditor Grid.Column="4" Grid.Row="1" Margin="0,0,10,0" AllowMultipleSelection="True" CheckBoxVisibility="Visible" ItemsSource="{Binding Path=ErrorParameters}" DisplayMemberPath="Name" IsSelectedMemberPath="IsSelected" IsEditable="False"/>
Best
Oliver
Hello Oliver,
Thank you for your post!
I have been investigating this issue, and I have been able to reproduce it. While it isn't exactly taking 3 minutes to select 1000 items (more like 1 on my machine), the performance is still rather slow. After profiling the application I used to test this, this appears to be coming from the XamComboEditor.SelectedItems.CollectionChanged event being fired for each and every item as it gets selected. I am unsure of a workaround to this, apart from implementing a custom selected items collection.
This behavior is rather unexpected, and so I have asked our engineering staff to take a look at it. To ensure this issue receives attention, I have logged it in our internal tracking system with a development ID of 203114. I have also created a case for you on this matter. It has an ID of CAS-158531-M7C0T1 and you can access it at https://es.infragistics.com/my-account/support-activity. This case will have development issue 203114 linked to it so that you can receive updates about this issue as they become available.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hi Andrew,
I am experiencing the same issue (IG WPF 14.1). Do you have an update on this?
Thanks,
Jozsef
Jozsef,
We did make a fix for development issue 203114 that is in the latest service release of 2014 Volume 2 and newer volumes. I recommend downloading the latest volume of Infragistics for WPF and testing your application to see if this indeed resolves the performance issue for you. Please note that 2014 Volume 1 was already out of maintenance when this fix was made so you will need to upgrade volumes to get the fix.
Let me know if you have any questions.