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..
HI,
Please let me know if you need further assistance regarding this issue.
Sincerely,
Matt
Developer Support Engineer
I think we should simplify the approach.
I am attaching a new sample using a XamDataGrid inside an Expander.
MattDeveloper Support Engineer
Hi Matt,
We would like your help on other issues listed below.
1> Group by State is not retained once pop up is closed. How to set the default Group by & Auto Expand All Rows when Grid is initialized first time.
2> If we set the XamDataGrid Height to 200, it shows vertical scroll bar. When we adjust width or height using Resize Indicator, Grid is not resizing. If we dont set the grid height, then the vertical scroll bar is not showing. How do we get the vertical scroll bar and resize ability?
3> When we have CellClickAction="EnterEditModeIfAllowed", we can select multiple cells, but we are unable to have multiple rows selected. How do we get cell edit ability and also multi row selection? This would be useful for our users.
4> Clicking on any record and pressing Enter key selects entire Grid and sets as Selected Item of Combo Box and also puts it into the Combo Box dropdown/editable area. How can we fix it?
5> Difference between XamCombo Editor in InfragisticsWPF4.Controls.Editors.XamComboEditor.v12.2 and XamComboEditor in InfragisticsWPF4.Editors.v12.2. Current Given Sample uses former one. We notice major differences in both controls. e.g. Former Control doesn’t have “Empty Text” Property. How to set the Empty Text Property.
Thanks
Sean
Please let me know if you need further assistance regarding this issue?
I am attaching a new sample.
I made the grid extend the full length of the combo.
I made it so that the DropDown stay open when grouping.
Please review the new sample.