private void gridView1_DoubleClick(object sender, EventArgs e) { GridView view = (GridView)sender; Point pt = view.GridControl.PointToClient(Control.MousePosition); // DoRowDoubleClick(view, pt); GridHitInfo info = view.CalcHitInfo(pt); if ((info.InRow || info.InRowCell) && (!gridView1.IsGroupRow(info.RowHandle))) { var dr = DialogResult.Cancel; if (info.Column.Name == "colPosLegalName") { int posId = (int)gridView1.GetRowCellValue(info.RowHandle, "PosId"); var dealerID = db.Pos.Where(x => x.ID == posId).Select(x => x.Dealers.ID).FirstOrDefault(); var frmEditPos = new FrmEditPos(posId, false, dealerID); dr = frmEditPos.ShowDialog(this); } else { int rankId = (int)gridView1.GetRowCellValue(info.RowHandle, "ID"); var newReviewForm = new Forms.FrmPosReviewNew(posrankId: rankId); dr = newReviewForm.ShowDialog(this); } if (dr == DialogResult.OK) { LoadData(); } } }
private void simpleButton2_Click(object sender, EventArgs e) { var newReviewForm = new Forms.FrmPosReviewNew(); var dr = newReviewForm.ShowDialog(this); if (dr == DialogResult.OK) { LoadData(); } }
private void simpleButton2_Click(object sender, EventArgs e) { var newReviewForm = new Forms.FrmPosReviewNew(); var dr = newReviewForm.ShowDialog(this); if (dr == DialogResult.OK) LoadData(); }