From acd229e9d071dccdd0f436c42542dbb83c01b2a6 Mon Sep 17 00:00:00 2001 From: Sreemon Premkumar M Date: Wed, 20 Aug 2025 17:29:01 +0530 Subject: [PATCH 1/2] ES-975464 - Resolve the ReadMe file length issue in this sample repository --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 04bbe7f..65b2853 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# How to add a new row in winforms datagrid when datagrid bound to datatable? -You can add the new row programmatically from a DataTable to the SfDataGrid by creating a new row in the `SfDataGrid.View` and set required value for that row. +# How to add a new row in WinForms DataGrid when DataGrid bound to datatable? -``` +You can add the new row programmatically from a `DataTable` to the [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls) (SfDataGrid) by creating a new row in the [SfDataGrid.View](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.SfDataGrid.html#Syncfusion_WinForms_DataGrid_SfDataGrid_View) and set required value for that row. + +``` csharp DataTable gridDataTable = this.sfDataGrid.DataSource as DataTable; if (gridDataTable == null || this.sfDataGrid.View == null) return; @@ -18,5 +19,4 @@ addNewRow.SetField(1, gridDataTable.Rows[0][1]); addNewRow.SetField(2, gridDataTable.Rows[0][2]); addNewRow.SetField(3, gridDataTable.Rows[0][3]); addNewRow.SetField(4, gridDataTable.Rows[0][4]); - ``` \ No newline at end of file From 30fd09746d9d8b86f6be03de005305708c671d48 Mon Sep 17 00:00:00 2001 From: SreemonPremkumarM Date: Wed, 19 Nov 2025 23:40:50 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65b2853..d179ddf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# How to add a new row in WinForms DataGrid when DataGrid bound to datatable? +# How to Add a New Row in WinForms DataGrid When DataGrid Bound to DataTable? -You can add the new row programmatically from a `DataTable` to the [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls) (SfDataGrid) by creating a new row in the [SfDataGrid.View](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.SfDataGrid.html#Syncfusion_WinForms_DataGrid_SfDataGrid_View) and set required value for that row. +This sample illustrates how to add a new row when [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid) (SfDataGrid) bound to DataTable. + +You can add the new row programmatically from a `DataTable` to the `DataGrid` by creating a new row in the [SfDataGrid.View](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.SfDataGrid.html#Syncfusion_WinForms_DataGrid_SfDataGrid_View) and set required value for that row. ``` csharp DataTable gridDataTable = this.sfDataGrid.DataSource as DataTable; @@ -19,4 +21,4 @@ addNewRow.SetField(1, gridDataTable.Rows[0][1]); addNewRow.SetField(2, gridDataTable.Rows[0][2]); addNewRow.SetField(3, gridDataTable.Rows[0][3]); addNewRow.SetField(4, gridDataTable.Rows[0][4]); -``` \ No newline at end of file +```