Skip to content

Commit acd229e

Browse files
ES-975464 - Resolve the ReadMe file length issue in this sample repository
1 parent e233b95 commit acd229e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# How to add a new row in winforms datagrid when datagrid bound to datatable?
2-
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.
1+
# How to add a new row in WinForms DataGrid when DataGrid bound to datatable?
32

4-
```
3+
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.
4+
5+
``` csharp
56
DataTable gridDataTable = this.sfDataGrid.DataSource as DataTable;
67
if (gridDataTable == null || this.sfDataGrid.View == null)
78
return;
@@ -18,5 +19,4 @@ addNewRow.SetField(1, gridDataTable.Rows[0][1]);
1819
addNewRow.SetField(2, gridDataTable.Rows[0][2]);
1920
addNewRow.SetField(3, gridDataTable.Rows[0][3]);
2021
addNewRow.SetField(4, gridDataTable.Rows[0][4]);
21-
2222
```

0 commit comments

Comments
 (0)