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
1935
IGGridViewDelegate canPerformAction: ... (bug or incorrect documentation ?)
posted

I noticed something interesting in implementing the gridview's context menu as described here...

http://help.infragistics.com/iOS/2015.2/?page=IGGridView_Enabling_Configuring_Context_Menus.html

The documentation in the example, AND in this API method...

(http://help.infragistics.com/iOS/2014.1/gridapi/Protocols/IGGridViewDelegate.html#//api/name/gridView:canPerformAction:forCellAtPath:withSender:)

... both say "Asks the delegate if a particular command should appear in the context menu", however, this in fact is not what happens.  I have coded this method to return NO for cases where it should not show my custom delete method, and it shows it anyway.

I have confirmed that 'theUserCanDeleteThisEntity' is in fact NO, but it still shows the menu item.



  • 40030
    Offline posted

    Hi David, 

    So the UIMenu has changed a bit since this feature was introduced to the grid. It looks like we need to update our docs a little bit. 

    However, its still basically holds up. For any system menu item you'll want return NO for, and you'll still NEED to return yes for any non system item. However, it won't hide non system items. You'll need to update the items collection for the menu for that(i.e. remove the items you don't want to be displayed). However, if you want the item to actually perform the action when clicked via the other IGGridView delegate method, then you still need to return YES for the menu item you're looking to connect, otherwise, it will not do anything. 

    Sorry for the confusion. 

    I hope this helps clear things up. 

    -SteveZ