Skip to content

Commit 30fd097

Browse files
Update README.md
1 parent acd229e commit 30fd097

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# How to add a new row in WinForms DataGrid when DataGrid bound to datatable?
1+
# How to Add a New Row in WinForms DataGrid When DataGrid Bound to DataTable?
22

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.
3+
This sample illustrates how to add a new row when [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid) (SfDataGrid) bound to DataTable.
4+
5+
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.
46

57
``` csharp
68
DataTable gridDataTable = this.sfDataGrid.DataSource as DataTable;
@@ -19,4 +21,4 @@ addNewRow.SetField(1, gridDataTable.Rows[0][1]);
1921
addNewRow.SetField(2, gridDataTable.Rows[0][2]);
2022
addNewRow.SetField(3, gridDataTable.Rows[0][3]);
2123
addNewRow.SetField(4, gridDataTable.Rows[0][4]);
22-
```
24+
```

0 commit comments

Comments
 (0)