diff --git a/DataGridWithGrouping.png b/DataGridWithGrouping.png new file mode 100644 index 0000000..87f2dbf Binary files /dev/null and b/DataGridWithGrouping.png differ diff --git a/README.md b/README.md index 6548186..123711e 100644 --- a/README.md +++ b/README.md @@ -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 [GroupColumnDescription](https://help.syncfusion.com/cr/windowsforms/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", @@ -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)