private void gridControl1_DoubleClick(object sender, EventArgs e) { if (gridView1.RowCount > 0) { string guid = ((DataRowView)(gridView1.GetFocusedRow())).Row[0].ToString(); frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.MaterialEdit(guid); } }
//编辑 private void btnEdit_Click(object sender, EventArgs e) { if (gridView1.RowCount > 0) { //int intRow = gridView1.GetSelectedRows()[0]; string guid = ((DataRowView)(gridView1.GetFocusedRow())).Row[0].ToString(); frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.MaterialEdit(guid); } }