private void gridControl_DSKhachHang_DoubleClick(object sender, EventArgs e) { // Get your currently selected grid row var rowHandle = gridView1.FocusedRowHandle; // Get the value for the given column - convert to the type you're expecting string maBN = gridView1.GetRowCellValue(rowHandle, "ID").ToString(); frmSystem_ListPatient_History child = new frmSystem_ListPatient_History { MaBN = maBN }; //child.AddItemCallback = new AddItemDelegate(this.AddItemCallbackFn); child.ShowDialog(); }
private void repositoryItembtnHistory_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { // Get your currently selected grid row var rowHandle = gridView1.FocusedRowHandle; // Get the value for the given column - convert to the type you're expecting string maBN = gridView1.GetRowCellValue(rowHandle, "ID").ToString(); frmSystem_ListPatient_History child = new frmSystem_ListPatient_History { MaBN = maBN }; //child.AddItemCallback = new AddItemDelegate(this.AddItemCallbackFn); child.ShowDialog(); }