Getting the rows cell to line up with parameters in a sp c# winform
- by Yaron Buki
I am using a datagridview on a win app designed in c#2010 express.
In the _row leave event of my datagrid I would like to use the
TableAdapter.usp_insert() that I created. But how does one match up the data in the cells of the datagridview row to the parameters in the stored procedure.
Thanks in advance I appreciate the education.
This is what if found so far!
Int i;
i = datagridview1.SelectedCells[0].RowIndex;
...
....
Eventually
string id = dataGridView1.Rows[i].cell[0].Value.ToString();
@para1 = id;
Etc..
What do you think?