In SfComboBox, you can bind the SelectedValue property of the SfComboBox. When SfComboBox is used as a template for the SfDataGrid column, set the SelectedValue in a separate SfComboBox. You can also set the SelectedValue for each SfComboBox in the SfDataGrid in a loaded event. This can be achieved in the following code. XAML
C# Figure 1: SelectedValues are binded to the SfComboBox Figure 2: SfComboBox dropdown is opened |
This page will automatically be redirected to the sign-in page in 10 seconds.
Hello. Can I apply for xamarin form? Because I need to add a column combobox to the grid of xamarin form Thank you.
Hi Huy Nguyen Xuan,
Thank you for your interest in Syncfusion products.
We can't do the same in Xamarin forms datagrid, you can load SfCombo box in the grid template column, but you can't bind the display member like this. In the following link, we have prepared a sample your requirement. In that we loaded SfComboBox in the template column but the initial combo box display value was hot coded.
http://www.syncfusion.com/downloads/support/directtrac/general/ze/SfComboBox-686372343
We planned to provide the SfComboBox column in DataGrid itself for the 2019 volume 2 main release, which is expected to be rollout by the end of June 2019. Using that, we can achieve this requirement exactly
Regards, Pradeep Kumar B