Skip to content

Commit 8a7cc46

Browse files
How to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)?
How to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)?
1 parent d3e7f08 commit 8a7cc46

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1-
# how-to-create-the-single-group-for-null-and-empty-value-in-windows-forms-datagrid-sfdatagrid-
2-
How to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)
1+
# how-to-create-the-single-group-for-null-and-empty-value-in-windows-forms-datagrid-sfdatagrid
2+
3+
## About the sample
4+
5+
This example illustrates how to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)
6+
7+
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 GroupColumnDescriptions.
8+
9+
```C#
10+
this.sfDataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription()
11+
{
12+
ColumnName = "Country",
13+
KeySelector = (string ColumnName, object o) =>
14+
{
15+
var item = (o as OrderInfo).Country;
16+
if (item == null || item == "")
17+
{
18+
return "";
19+
}
20+
21+
return item;
22+
}
23+
});
24+
```
25+
26+
## Requirements to run the demo
27+
Visual Studio 2015 and above versions

0 commit comments

Comments
 (0)