HOW TO SHOW THE DISPLAY MEMBER AS GROUP KEY WHEN GROUPING

Hi.

When you group a sfdatagrid by a column with drowpdow it shows ValueMember as Group Key. But I need to show the Display Member as Group key.


For example in the picture the sfdatagrid is group by "Tipo de producto" DropdownColumn. I need to show the display member "lacteo" instead the value member "42".



2 Replies

MA Mohanram Anbukkarasu Syncfusion Team August 25, 2021 02:45 PM UTC

Hi Jose, 

Thanks for contacting Syncfusion support.  

We are currently working on this. We will update with further details on August 27, 2021. We appreciate your patience until then.  

Regards, 
Mohanram A. 



MA Mohanram Anbukkarasu Syncfusion Team August 27, 2021 08:32 AM UTC

Hi Jose, 

Thanks for your patience. 

We would like to let you know that by default, the group caption text will be displayed based on MappingName of combo box column. This can be changed to display the DisplayMember by using the GroupMode property of column as shown in the below given code example.  

Code example :  

sfDataGrid1.Columns.Add(new GridComboBoxColumn() 
 { 
     MappingName = "ShipCityID", 
     HeaderText = "Ship City", 
     DisplayMember = "ShipCityName", 
     ValueMember = "ShipCityID", 
     SortMode = Syncfusion.Data.DataReflectionMode.Display, 
     DataSource = new OrderInfoCollection().CityList, 
     GroupMode = Syncfusion.Data.DataReflectionMode.Display 
 }); 

Please let us know if you require any other assistance from us.  

Regards, 
Mohanram A. 


Loader.
Up arrow icon