Hi
There is a DataGridView in my form with a DataTable as a DataSource . This DataTable is linked to a DataBase. I set the AllowUserToAddRows property to false , so when I run the program there is no any row in dgv . I use the code below to add new row :
So a new row add to dgv (in fact this row add to datatable) . First I fill the cells of this row with right values . But when I try to update the DataTable this new row don't add to database whereas if AllowUserToAddRows property set to true , when I run the program there is a row in dgv and everything is OK.I want to add the row manually in the program .
Thanks
There is a DataGridView in my form with a DataTable as a DataSource . This DataTable is linked to a DataBase. I set the AllowUserToAddRows property to false , so when I run the program there is no any row in dgv . I use the code below to add new row :
VB.NET:
MyDataTable.Rows.Add()
Thanks