GridComboBoxColumn display text not updated
I'm seeing a problem when GridComboBoxColumn DisplayMember value changes in the background (and fires PropertyChangedEvent) then displayed text in the grid is not updated until grid is reloaded or sorting is changed, etc. I would expect this to be updated immediately. I have LiveDataUpdateMode="AllowDataShaping".
SIGN IN To post a reply.
3 Replies
DB
Dinesh Babu Yadav
Syncfusion Team
May 22, 2019 09:23 AM UTC
Hi Ondrej,
Thank you for contacting Syncfusion Support.
We would like to let you know that the cell value of GridComboBoxColumn will be updated only while changing the underlying property (MappingName) that is bound to the column, when ItemsSource for grid and ComboBox column are same. If you are using different underlying business objects for both grid and ComboBoxColum, the property changes in combobox column will not be listened and hence the cell value will not be updated. This is the default behavior of SfDataGrid.
If you are still facing the same issue, can you please revert us with the code files related to SfDataGrid and ComboBox column settings? This will helps us to investigate further and provide appropriate solution at earlier.
Regards,
Dinesh Babu Yadav.
Hi Ondrej,Thank you for contacting Syncfusion Support.We would like to let you know that the cell value of GridComboBoxColumn will be updated only while changing the underlying property (MappingName) that is bound to the column, when ItemsSource for grid and ComboBox column are same. If you are using different underlying business objects for both grid and ComboBoxColum, the property changes in combobox column will not be listened and hence the cell value will not be updated. This is the default behavior of SfDataGrid.If you are still facing the same issue, can you please revert us with the code files related to SfDataGrid and ComboBox column settings? This will helps us to investigate further and provide appropriate solution at earlier.Regards,Dinesh Babu Yadav.
I have the same issue with this,
this is my code
<Syncfusion:SfDataGrid Name="WallInput" AllowDeleting="True" AllowEditing="True" AllowResizingColumns="True" AllowResizingHiddenColumns ="True" AutoGenerateColumns="False" ColumnSizer="Auto" EditTrigger="OnTap" SelectionUnit="Row" ItemsSource="{Binding SupportInfos}" LiveDataUpdateMode="AllowChildViewUpdate"> <Syncfusion:SfDataGrid.Resources> <Style TargetType="TextBox" /> <Style TargetType="ComboBox" BasedOn="{StaticResource MahApps.Styles.ComboBox}"/> </Syncfusion:SfDataGrid.Resources> <Syncfusion:SfDataGrid.Columns> <Syncfusion:GridTextColumn HeaderText="ID" MappingName="Id"/> <Syncfusion:GridComboBoxColumn HeaderText="Support Type" MappingName="PointSupportType" ItemsSource="{Binding Source={StaticResource SupportTypes}}"/> <Syncfusion:GridComboBoxColumn HeaderText="Support Name" MappingName="SupportInfo" ItemsSource="{Binding JobModel.EngineerMemberList}" UseBindingValue="True" DisplayMemberPath="EngineerName"/> <Syncfusion:GridComboBoxColumn HeaderText="Size Grade" MappingName="SupportInfo.RealSizeGrade" UseBindingValue="True"/> </Syncfusion:SfDataGrid.Columns> </Syncfusion:SfDataGrid>
if i using MappingName="SupportInfo.RealSizeGrade" then if i changed RealSizeGrade form code behind, display text will be update to viewbut if i using MapingName ="SupportInfo" and DisplayMemberPath="RealsSizeGrade" like this, the Display text will not update to view<Syncfusion:SfDataGrid Name="WallInput" AllowDeleting="True" AllowEditing="True" AllowResizingColumns="True" AllowResizingHiddenColumns ="True" AutoGenerateColumns="False" ColumnSizer="Auto" EditTrigger="OnTap" SelectionUnit="Row" ItemsSource="{Binding SupportInfos}" LiveDataUpdateMode="AllowChildViewUpdate"> <Syncfusion:SfDataGrid.Resources> <Style TargetType="TextBox" /> <Style TargetType="ComboBox" BasedOn="{StaticResource MahApps.Styles.ComboBox}"/> </Syncfusion:SfDataGrid.Resources> <Syncfusion:SfDataGrid.Columns> <Syncfusion:GridTextColumn HeaderText="ID" MappingName="Id"/> <Syncfusion:GridComboBoxColumn HeaderText="Support Type" MappingName="PointSupportType" ItemsSource="{Binding Source={StaticResource SupportTypes}}"/> <Syncfusion:GridComboBoxColumn HeaderText="Support Name" MappingName="SupportInfo" ItemsSource="{Binding JobModel.EngineerMemberList}" UseBindingValue="True" DisplayMemberPath="EngineerName"/> <Syncfusion:GridComboBoxColumn HeaderText="Size Grade" MappingName="SupportInfo" DisplayMemberPath="RealSizeGrade" UseBindingValue="True"/> </Syncfusion:SfDataGrid.Columns>
What i need is using DisplayMemberPath to display value form ComboboxColumn and it can update value if i change value of Property form BackGround. Plase help
MA
Mohanram Anbukkarasu
Syncfusion Team
August 7, 2020 04:38 PM UTC
Hi Nguyen,
Thanks for contacting Syncfusion support.
As we mentioned above in our previous update the cell value of GridComboBoxColumn will be updated only while changing the underlying property (MappingName) that is bound to the column. You are using different business objects for the DataGrid and ComboBoxColum. So you should change the value of the property that matches the mapping name of the combobox column in the collection bound to the ItemsSource property of the DataGrid. This is the expected behavior of SfDataGrid.
Regards,
Mohanram A.
SIGN IN To post a reply.
- 3 Replies
- 4 Participants
-
OS Ondrej Svoboda
- May 21, 2019 02:41 PM UTC
- Aug 7, 2020 04:38 PM UTC