Probably ridiculous but I am loading a combo editor with 100K items. There is an inital lag when I create the new control that I believe is related to binding the combobox within an editor style of my grid (using an object data provider). My question is, is there a way to prevent this lag??
<igDataGrid:Field Name="Code" Label="CC No./Part No."> <igDataGrid:Field.Settings> <igDataGrid:FieldSettings LabelMinWidth="100" EditorType="{x:Type igEditors:XamComboEditor}" > <igDataGrid:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamComboEditor}" > <Setter Property="ItemsProvider" Value="{StaticResource QADCodes}" /> <Setter Property="IsEditable" Value="true" /> <EventSetter Event="KeyUp" Handler="grdUsedPartValue_KeyUp" /> <EventSetter Event="SelectedItemChanged" Handler="Inventory_SelectedItemChanged"/> </Style> </igDataGrid:FieldSettings.EditorStyle> </igDataGrid:FieldSettings> </igDataGrid:Field.Settings> </igDataGrid:Field>
The inventory list is 100K items of the class inventory which is defined by:
string description
string description2
string qadcode
string per
This seems to be related the issue I mentioned in the previous post. I assume the items in the InventoryList (i.e. what will be the items of the itemsprovider) is just a standard CLR class. What datatype is QADCode on that object? I just want to make sure my test is accurately replicating this scenario.
Absolutely -- I declare my ObjectDataProvider in the code behind (just as an experiment, but I get the same result even in XAML). App.InventoryList is a static list...
ObjectDataProvider dp = new ObjectDataProvider(); dp.IsAsynchronous = true; dp.ObjectInstance = App.InventoryList;
I then add it to the page resources.
this.Resources.Add("InventoryDP", dp);
In Xaml I create a comboitemsprovider for it:
<igEditors:ComboBoxItemsProvider x:Key="QADCodes" DisplayMemberPath="QADCode" ValuePath="QADCode" ItemsSource="{Binding Source={StaticResource InventoryDP}}"> </igEditors:ComboBoxItemsProvider>
Then, in a grid I reference the provider:
<igDataGrid:Field Name="QADCode" Label="CC No./Part No."> <igDataGrid:Field.Settings> <igDataGrid:FieldSettings LabelMinWidth="100" EditorType="{x:Type igEditors:XamComboEditor}" > <igDataGrid:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamComboEditor}" > <Setter Property="ItemsProvider" Value="{StaticResource QADCodes}" /> <Setter Property="IsEditable" Value="true" /> <EventSetter Event="KeyUp" Handler="grdUsedPartValue_KeyUp" /> <EventSetter Event="SelectedItemChanged" Handler="Inventory_SelectedItemChanged"/> </Style> </igDataGrid:FieldSettings.EditorStyle> </igDataGrid:FieldSettings> </igDataGrid:Field.Settings> </igDataGrid:Field>
Let me know if you see any way to improve this...
I'm not sure if its the same issue you are describing but I am seeing a delay when attempting to first open a xamComboEditor that has 100k items. I will submit this for review but can you provide a sample of the issue you are seeing so I can tell if its the same issue?