Thanks for the reply
But there is not current cell mouse up event for DataBoundGrid
when i specified cell mouse event i got following compilation error
SlbWFTIPretestListingUI.m_GridDataBoundGrid1_CellMouseUp(object, Syncfusion.Windows.Forms.Grid.GridCellMouseEventArgs)'' does not match delegate ''void System.Windows.Forms.MouseEventHandler(object, System.Windows.Forms.MouseEventArgs)''
Can you help?
>The problem is that when a cell is active, the grid does not get the mouse up. Instead the cell control gets it. So, one way to handle this is to subcribe to the cell control''s mouseup event. You can do this dynamically as you move from cell to cell in teh grid''s CurrentCellControlGotFocus event. You would also need to unsubscribe to it in the LostFocus event. Here are some snippets.
>
>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));
>}
>