Category / Section
How to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)?
1 min read
By default, empty and null values are created the separate groups in SfDataGrid. You can able to create the single group for empty and null value by using KeySelector in GroupColumnDescription.
this.sfDataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "Country", KeySelector = (string ColumnName, object o) => { var item = (o as OrderInfo).Country; if (item == null || item == "") { return ""; } return item; } });