Hi, Is it possible to have a column that has a combobox that acts like ComboBoxAdv? Is there any sample here to show its done?
Thanks,
Hi Moustafa,
Solution 1:
SfDataGrid provides support for various built-in column types as
GridComboBoxColumn. The GridComboBoxColumn derived from GridColumn which hosts
ComboBox as edit element. For more information related to GridComboBoxColumn,
please refer the below user guide documentation link,
UG Link: https://help.syncfusion.com/wpf/datagrid/column-types#gridcomboboxcolumn
https://help.syncfusion.com/wpf/datagrid/column-types#create-the-renderer-of-existing-column
Solution 2:
Your requirement to have a column that
has a combobox that acts like ComboBoxAdv in SfDataGrid can be achieved by load
the ComboBoxAdv as CellTemplate in GridTemplateColumn. Please refer to the
below code snippet,
|
<syncfusion:GridTemplateColumn MappingName="Children" HeaderText="Children"> <syncfusion:GridTemplateColumn.CellTemplate> <DataTemplate> <syncfusion:ComboBoxAdv ItemsSource="{Binding Persons,Source={StaticResource viewModel}}" DisplayMemberPath="Name" AllowMultiSelect="True" AllowSelectAll="True" SelectedValueDelimiter=";" IsEditable="True" DefaultText="Select Childred..." SelectedValuePath="Id" /> </DataTemplate> </syncfusion:GridTemplateColumn.CellTemplate> </syncfusion:GridTemplateColumn> |
UG Link: https://help.syncfusion.com/wpf/datagrid/column-types#gridtemplatecolumn
Please find the sample in the attachment and let us know if you have any
concerns in this.
Regards,
Vijayarasan S
Hi Vijayarasan,
I am hoping to get autocomplete and filtering but apparently ComboboxAdv does not support this either. Is there any way to have a combobox column with autocomplete and filtering for the list I select from?
Hi Moustafa,
We are currently checking the possibilities to achieve your requirement. We
will check and update further details on July 01, 2022.
We appreciate your patience.
Regards,
Vijayarasan S
Hi Moustafa,
Your requirement to perform the autocomplete and filtering in ComboBoxAdv by
enabling the EnableToken property and AutoCompleteMode as Suggest in ComboBoxAdv.
Please refer to the below code snippet,
|
<syncfusion:GridTemplateColumn MappingName="Children" Width="200" AllowFiltering="True" TextWrapping="Wrap" HeaderText="Children" AllowEditing="True" > <syncfusion:GridTemplateColumn.CellTemplate> <DataTemplate> <syncfusion:ComboBoxAdv ItemsSource="{Binding Persons,Source={StaticResource viewModel}}" DisplayMemberPath="Name" AllowMultiSelect="True" AllowSelectAll="True" AutoCompleteMode="Suggest" SelectedValueDelimiter=";" SelectionChanged="OnSelectionChanged" IsEditable="True" EnableToken="true" DefaultText="Select Childred..." SelectedValuePath="Id"
/> </DataTemplate> </syncfusion:GridTemplateColumn.CellTemplate> </syncfusion:GridTemplateColumn> |
Please find the sample in the attachment and let us know if you have any
concerns in this.
Regards,
Vijayarasan S
Can you please test what you just sent me? It doesnt work. I removed the following because I dont need a multi-select but its bugged and the values I
AllowMultiSelect="True"
AllowSelectAll="True"
SelectedValueDelimiter=";"
Hi Moustafa,
Sorry for the inconvenience caused.
We misunderstood your requirement, please provide more information related
to your query?
1. Provide more details about your scenario with image illustrations
2. Share the details about your exact requirement on GridComboBoxColumn with the features list
Kindly revert to us with the above requested details. It
will be more helpful for us to check the possibilities to resolve the reported
problem.
Regards,
Vijayarasan S