Hello
I'm using xamwebgrid 9.2.20092.2014.
I have successfully implemented a xamContextMenu on a right mouse click and now I want to set the active cell of the grid to the one under the mouse pointer on the right mouse button click.
I'm trying to use the grids MouseRightButtonDown event but i just get this when i build the project :
Error 569 The property 'MouseRightButtonDown' does not exist on the type 'XamWebGrid' in the XML namespace 'clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.XamWebGrid.v9.2'.
Thanks, this worked great.
Hi,
You could achieve this scenario by using the XamWebContextMenu.Opening event:
private void XamWebContextMenu_Opening(object sender, OpeningEventArgs e)
{
CellBase cell = null;
Row row = null;
List<CellControl> cells = e.GetClickedElements<CellControl>();
if (cells.Count == 0)
return;
}
cell = cells.First().Cell;
row = cell.Row as Row;
if (row.RowType != RowType.DataRow)
cell.IsActive = true;
Note the e.GetClickedElements() method.
HTH,