alexa-tracking

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/530c2301c0cb1754798b4791/cmaster-detail-problem
[c#]Master-Detail Problem
Code:

DetailForm detForm = new DetailForm(idbarang, namaBarang, kategori, stok);
detForm.FormClosed += new FormClosedEventHandler(f_FormClosed);

detForm.ShowDialog();

inventoryDataGridView.Focus();
inventoryDataGridView.Rows[idx].Selected = true;
}

void f_FormClosed(object sender, FormClosedEventArgs e)
{
loadData();
}

alurnya begini
form 1 showDialog form2 berdasarkan field pada datagrid di form1,
ketika form2 closed, form 1 akan meload datagrid yang diubah di form 2

gimana caranya biar setelah form2 closed, datagrid pada form1 menselect row yang terakhir diselect
setelah data selesai diload ?

code diatas menampilkan 2 selected rows
row[0] dan row yg terakhir diselectemoticon-Frown emoticon-Frown
sundul
emoticon-Big Grin...