Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5520
XamGrid Context Menu
posted

Hi,

I want to add a context menu to my grid.

i used the following sample:

http://forums.infragistics.com/blogs/devin_rader/archive/2011/04/15/extending-xamgrid-with-a-right-click-context-menu.aspx

now i have 2 questions:

 

  1. When i save the layout and reload it, i get an error "Object reference not set to an instance of an object."
  2. On ContextMenuOpening, using List<CellControl> elements = e.GetClickedElements<CellControl>(); we are getting the cell clicked if a cell is clicked
is there a way to get the column header and the row selector when clicked? i mean i want to give different context menu when the column header is clicked and when a row is clicked.
regards

 

 

Parents
  • 40030
    Offline posted

    Hi, 

    1. I'm not sure about the error you're getting. Do you have a StackTrace? Or even better could you share your sample?

    2. A HeaderCell's Visual element isn't a CellControl, its a HeaderCellControl, so you should pass that in as the generic argument instead. 

    -SteveZ

Reply Children