|
<Syncfusion:SfDataGrid x:Name="sfDataGrid2"
HorizontalAlignment="Left"
Height="159"
VerticalAlignment="Top"
Width="922"
AllowFiltering="True"
RowHeaderWidth="15"
AllowEditing="True"
FooterRowsCount="1"
RowHeight="18"
AutoGenerateColumns="False"
AutoGenerateColumnsMode="ResetAll">
</Syncfusion:SfDataGrid>
//Column definition
sfDataGrid2.Columns.Add(new GridNumericColumn()
{
HeaderText = "Article ID",
MappingName = "id",
NumberDecimalDigits = 0,
ColumnSizer = GridLengthUnitType.SizeToHeader
});
sfDataGrid2.Columns.Add(new GridTextColumn() { HeaderText = "Name", MappingName = "name" });
//This column is only to show that data exists in this column
sfDataGrid2.Columns.Add(new GridNumericColumn() { HeaderText = "Group ID", MappingName = "idgroup", NumberDecimalDigits = 0, ColumnSizer = GridLengthUnitType.SizeToHeader });
sfDataGrid2.Columns.Add(new GridComboBoxColumn()
{
MappingName = "idgroup",
ItemsSource = view.ComboBoxDetails.DefaultView,
HeaderText = "Group",
DisplayMemberPath = "groupname",
SelectedValuePath = "idgroup"
});
sfDataGrid2.ItemsSource = view.Details.DefaultView; |
Thank you for the reply. I still have the same problem.
When I run your project I get this
When I click on the Group field I can see Drink and Food in Combobox
but after selection, nothing is displayed in previous field
This is the same problem I had before. Could you please advise how to proceed.
Best regards,
Hi,
my bad. I still have 14.2460.0.26 version installed. I installed 15.0.2.40 right away to check it. The newest version I installed on my laptop but I didn't tried there.
I will try and get back to you.
Thanks for your effort and time.
Hi,
my bad. I still have 14.2460.0.26 version installed. I installed 15.0.2.40 right away to check it. The newest version I installed on my laptop but I didn't tried there.
I will try and get back to you.
Thanks for your effort and time.
Hi
just to confirm it works with new version.
Thank you again.
When customizing your grid by programmatically adding a GridComboBoxColumn, it’s helpful to consider how users interact with individual selections or items. Similarly, Wendy's Menu Price provides updated details for each menu item, giving a clear snapshot for easy selection. Just like in grids, having precise item information makes decision-making smoother and more efficient.