Windows Form'da Datagridview'de seçilen itemin id 'si nasıl alınır?
3
●472
- 19-06-2013, 15:50:57Gridin CellDoubleClick eventine
private void GrdTum_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string rownum = GrdTum.CurrentRow.Cells["Id"].Value.ToString(); }seklınde kullana bilirsin yada bir ContextMenuStrip atıp
private void GrdTum_RowContextMenuStripNeeded(object sender, DataGridViewRowContextMenuStripNeededEventArgs e) { e.ContextMenuStrip = contextMenuStrip1; rownum =GrdTum.CurrentRow.Cells["Id"].Value.ToString(); }seklındede alabilirsin