Im trying to find out how to insert/update/delete rows in a databound datagridview in C#
I tried to search for some DEMO applications with source but came up short. My problem is that i am unable to find suitable events to pick up the data from the Inserted Row or updated row.
Now the delete part is easy where I am deleting the selected row, thus can pick up the data from the selected row property.
I have tried to use the rowLeave event and create a row from the e.RowIndex but then i only have value in the first Cell.
What events can be used to get the values from the cells. see code for example.
or if anyone knows of or has an demo application with source that i can use. don't Care if it is in VB, C , C++ , C# or java... all the same stuff :)
private void InsertRowToGroups(int RowIndex)
DataGridViewRow dr = odgMain.Rows[RowIndex];
/*Trows Exception where Cell is null. But Cell Count is 2*/
MessageBox.Show(dr.Cells.Value.ToString() + " Is the value of cell 0\n " +dr.Cells.Value.ToString() + " Is the value of Cell 1 \n" );
private void odgMain_RowLeave(object sender, DataGridViewCellEventArgs e)