Hi ,
Assuming that you have Table A with Fields {int A_ID (primaryKey), Varchar A_NAME }
Table B with Fields {int ID (Primary Key), varchar address, int A_ID (Foren Key)}
After Select queries
1. Filled data in our grid view 1 dgv1
2. and add dgv1 Command field Select
3. on selected index changed event
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
lblAId.Text = GridView1.SelectedRow.Cells[0].Text;
Gridview2.datasource = youdatset.table[0]
Gridview2.databind();
}
abow code is for asp.net web app and for windows code will same only Gridview2.databind(); is now required
the concept is that filling master table a data in Grid1 and on selected index changed event get related data from details Table b and fill in grid2
as I see in your function account_list_cell_click
you can note change a data-bind grid cell value like that you should use data table change their value and update grid view data source
I hope this will use full for you