Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added DataGridWithGrouping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# 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 WinForms DataGrid?

## About the sample
This example illustrates how to create the single group for null and empty value in [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid) (SfDataGrid).

This example illustrates how to create the single group for null and empty value in Windows Forms DataGrid(SfDataGrid)
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](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.GroupColumnDescription.html#Syncfusion_WinForms_DataGrid_GroupColumnDescription_KeySelector) in [GroupColumnDescriptions](https://help.syncfusion.com/cr/Syncfusion.WinForms.DataGrid.GroupColumnDescription.html).

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.

```C#
```csharp
this.sfDataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription()
{
ColumnName = "Country",
Expand All @@ -17,11 +15,9 @@ this.sfDataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription()
{
return "";
}

return item;
}
});
```

## Requirements to run the demo
Visual Studio 2015 and above versions
![DataGrid with null and empty value grouping](DataGridWithGrouping.png)