Hi,
I'm trying to make a context menu for a XamDataGrid, but specifically for the section where no rows are. So, if there are any other context menus, such as on the rows themselves or on the column headers (the visibility pane), then these context menus should remain unchanged. When I simply set a ig:ContextMenuService.Manager on the XamDataGrid, this will override the visibility pane on the column headers.
Regards, Stefan
Hi, your sample doesn't have a context menu so you cannot see what I mean. I altered your sample so now there is a context menu. Actually, there are 2: one for the rows, and one for the background (empty area). Now I'm getting strange behavior when right clicking the header. Sometimes, only the field chooser pops up (as it should be), but sometimes both the field chooser AND the context menu pop up...
Also, is there a way to show the field chooser as modal dialog?
And finally, is it possible to place the field chooser next to the column header. The start position seems random.
Hello Stefan,
I have been further researching your issue and have created a small sample application for you.
In the sample application I have created a style for the LabelPresenter and in the style there is an event setter for the PreviewMouseRightButtonDown of the presenter.
In the handler of the event I call the ShowFieldChooser command of the xamDataGrid.
Please find the attached sample application and feel free to let me know if you have any further questions on this matter.
Hello Gergana,
The post you refer to is actually one of my own. You are right in saying that Krasimir already helped me so far, but this issue is actually still present in the solution that Krasimir posted. If you open his solution, you will notice that the context menu for the column headers is overriden by the context menu that is intended for the empty-rows area. So, to make it more clear what I need exactly: if you right-clik on the *empty* area (e.g. the area below the row "parent 9"), then the "test root" context menu should pop up just like it does right now. So this part is correct. But, if you right-click the column header (e.g. the header "Name"), the field chooser should pop-up, and *not* the custom context menu. Do you see what I mean?
Thank you for your post.
I have been looking into your question. I believe that Krasimir has already provided a solution for this issue. Would you please take a look at the following forum thread: http://ko.infragistics.com/community/forums/p/85970/428947.aspx.
Please do not hesitate to let me know if I have misunderstood your requirements or you have any additional questions on the matter.