Hi,
Is there any direct way of creating context menu on Silverlight XamGrid, one way i found out is by extending as shown on
http://es.infragistics.com/community/blogs/devin_rader/archive/2011/04/15/extending-xamgrid-with-a-right-click-context-menu.aspx
But apart from this is there any other way of achieving this, without extending.
-Abhi
Hello,
Thank you for posting!
Have you tried checking if the element which is being clicked is a DataRow?
Row row = (from x in e.GetClickedElements<CellsPanel>()
select x.Row).FirstOrDefault() as Row;
CellControl cell = e.GetClickedElements<CellControl>().FirstOrDefault();
if (cell != null && cell.Column is FillerColumn)
e.Cancel = true;
//Discard displaying the context menu when not clicking on data rows:
if (row == null || row.RowType != RowType.DataRow)
{
}
This approach is used in the XamGridAddContextMenu_modified.zip sample project which I have attached in one of my previous posts.
Please feel free to let me know if this helps you in resolving your issue.
I made context menu to available on left click. After moving context menu from right to left click, menu is coming on header of xamgrid column and also on pager column. how to disable on those items ?
Hello Abhijeet,
Thank you for your feedback. I am glad that you resolved your issue and I believe that this will be helpful for other community members.
Its working,
Thanks,
Abhijeet
I am just checking if my last reply was helpful for you.
If you require any further assistance, please do not hesitate to ask.