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
440
XamContextMenu is opening even on click of pagenumbers
posted

In XamGrid i have context menu, i am trying to stop showing the context menu on click of page numbers.

menu is coming even on changing the page numbers.

is there any fix for this ? 

  • 138253
    Offline posted

    Hello,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

  • 6475
    Suggested Answer
    posted

    Hi,

    You can use the approach described here: http://ko.infragistics.com/community/forums/p/74396/385723.aspx#385723

    Basically, you'd want to add event handler to ContextMenu's Opening event, check if the clicked object was the Pager row and cancel the operation if so. Your code should look something similar to this:

    private void XamContextMenu_Opening(object sender, OpeningEventArgs e)

    {

        RowBase row = (from x in e.GetClickedElements() select x.Row).FirstOrDefault();

        if (row == null || row is PagerRow)        

            e.Cancel = true;

     

     Hope this helps,