Hi. In the winforms version of your combobox there is a nice feature to be able to bind a dataset to the combobox to show a grid in the drop down. Is this available in the XamComboEditor. If not any ideas how to set this up?
Hello,
Basically, the XamComboEditor does not support this, but you could retemplate the ComboBoxDataItem's template and put a XamDataGrid inside, so that you can bind to a Collection,DataTable,etc.
<igEditors:XamComboEditor Name="xamComboEditor1">
<igEditors:XamComboEditor.Resources>
<DataTemplate DataType="{x:Type igEditors:ComboBoxDataItem}" >
<Grid>
<igDP:XamDataGrid x:Name="TextBlock" DataSource="{Binding Path=Value}" />
</Grid>
</DataTemplate>
</igEditors:XamComboEditor.Resources>
</igEditors:XamComboEditor>
Then create ComboBoxItemsProvider and add a ComboBoxDataItem, which Value property you can set to a DataTable,Collection,etc. Add the ComboBoxDataItem in the ComboBoxItemsProvider and set the ItemsProvider property of the XamComboEditor.
string[] values = new string[] { "value1", "value2", "value3" };ComboBoxDataItem cb = new ComboBoxDataItem();cb.Value = values;ComboBoxItemsProvider c = new ComboBoxItemsProvider();c.Items.Add(cb); xamComboEditor1.ItemsProvider = c;
Hope this helps.
Hey Alex. This is what I needed, thanks. Question. When I click the drop down it takes a second or two to actually drop down the grid. Does rendering the grid take that long? Do you have that problem? Thanks for your help on this..