GridComboBoxColumn not taking whole screen width

Hi,

I've a DataGrid with some comboboxes integrated into them. Most often, when I tap onto the combobox, it's width is equal to the column width in which the combobox is embedded. Sometimes, the width equals to the screen width.

In my case, I need the complete screen width, because no information is visible, if the combobox width is equal to the column size.


How can I force the combobox selection to always have the right size?

The combobox is integrated like this:

<datagrid:GridComboBoxColumn
                            HeaderText="Source"
                            LoadUIView="True"
                            ItemsSourceSelector="{StaticResource LocationSourceSelector}"
                            MappingName="SelectedID"
                            ValueMemberPath="LocationId"
                            DisplayMemberPath="Name"
                            AllowEditing="True"
                        />

Thanks for your help.

Best regards,
Stefan Maton

1 Reply 1 reply marked as answer

PK Pradeep Kumar Balakrishnan Syncfusion Team January 19, 2021 09:07 AM UTC

Hi Stefan, 
 
Thank you for using Syncfusion controls. 
 
We have checked the shared image link “Image with combobox size ok” is broken or image is removed and we have checked your requirement “How to change GridComboBox column drop down and screen size to drop down width.” Your requirement can be achieved by setting DropDownWidth of GridComboBoxColumn. Refer the following code snippet for reference. 
 
Code Snippet: 
 
<sfgrid:GridComboBoxColumn BindingContext="{x:Reference viewModel}" 
                                 HeaderText="Customer Name"                                  
                                 ItemsSource="{Binding CustomerNames}"                                
                                 DropDownWidth="{Binding Width,Source={x:Reference dataGrid}}" 
                                 MappingName="CustomerID" /> 
 
We have also attached sample for your reference in the following ink in the attached sample SfCombobox column drop down width is equal to SfDataGrid width. 
 
Let us know if you need any further assistance on this. 
 
Regards, 
Pradeep Kumar B 


Marked as answer
Loader.
Up arrow icon