Home Forums WinForms controls Xceed Grid for WinForms Context Menu for Xceed Grid Reply To: Context Menu for Xceed Grid

User (Old forums)
Post count: 23064

Its now working when I added context menu to cell’s mouse down event as shown below but now Context Menu doesn’t display at the correct location.The X and Y coord’s are based off the cell, not the cell’s location in the grid. How do I get the cell’s location?

grdReport.SetDataBinding(ds, “REPORT”);
foreach(Xceed.Grid.DataCell cell in grdReport.DataRowTemplate.Cells)
{cell.DoubleClick += new EventHandler(CellDoubleClick);
cell.MouseDown += new MouseEventHandler(Cell_MouseDown);}

private void Col_MouseDown(object sender, MouseEventArgs e )
if (e.Button == MouseButtons.Right )
contextMenu1.Show(grdReport, new System.Drawing.Point(e.X, e.Y));


Imported from legacy forums. Posted by xUser (had 1111 views)