I have a custom datagrid and I want to have it such that the context menu has different menu items based on what part of the grid is clicked. If a column header is clicked, show "Insert column..". The first column of the grid is a read-only, "row id" column. If one of the row headers is clicked, show "Insert row...". If one of the cells in the grid is clicked show another menu.
I see the DataGrid has a contextMenu property but this would apply to any area clicked. Not sure if I should (or how to) dynamically change the menu based on what area is clicked. For the column header, I see there is a DataGridHeader class that has a contextMenu property. I can get to the columns of the datagrid but not clear on how to get to the DataGridHeader for the columns. Any ideas how to approach this? Thanks, Phil

