BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void gridDataBoundGrid1_MouseUp(object sender, MouseEventArgs e) { int row, col; if(e.Button == MouseButtons.Right && this.gridDataBoundGrid1.PointToRowCol(new Point(e.X,e.Y), out row, out col)) { ShowMenuFor(row, col); } } private void currentCell_MouseUp(object sender, MouseEventArgs e) { if(e.Button == MouseButtons.Right) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; ShowMenuFor(cc.RowIndex, cc.ColIndex); } } private void gridDataBoundGrid1_CurrentCellControlGotFocus(object sender, ControlEventArgs e) { e.Control.MouseUp += new MouseEventHandler(currentCell_MouseUp); } private void gridDataBoundGrid1_CurrentCellControlLostFocus(object sender, ControlEventArgs e) { e.Control.MouseUp -= new MouseEventHandler(currentCell_MouseUp); } private void ShowMenuFor(int row, int col) { MessageBox.Show(string.Format("menu for ({0},{1}", row, col)); }
>private void gridDataBoundGrid1_MouseUp(object sender, MouseEventArgs e) >{ > int row, col; > if(e.Button == MouseButtons.Right > && this.gridDataBoundGrid1.PointToRowCol(new Point(e.X,e.Y), > out row, > out col)) > { > ShowMenuFor(row, col); > } >} >private void currentCell_MouseUp(object sender, MouseEventArgs e) >{ > if(e.Button == MouseButtons.Right) > { > GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; > ShowMenuFor(cc.RowIndex, cc.ColIndex); > } >} >private void gridDataBoundGrid1_CurrentCellControlGotFocus(object sender, ControlEventArgs e) >{ > e.Control.MouseUp += new MouseEventHandler(currentCell_MouseUp); >} >private void gridDataBoundGrid1_CurrentCellControlLostFocus(object sender, ControlEventArgs e) >{ > e.Control.MouseUp -= new MouseEventHandler(currentCell_MouseUp); >} >private void ShowMenuFor(int row, int col) >{ > MessageBox.Show(string.Format("menu for ({0},{1}", row, col)); >} >