How to disable ToolStripMenuItem in Context menu Dynamically?

Posted by NIGHIL DAS on Stack Overflow See other posts from Stack Overflow or by NIGHIL DAS
Published on 2011-01-14T10:48:21Z Indexed on 2011/01/14 10:53 UTC
Read the original article Hit count: 205

Filed under:
|

In my windows application i have a context menu with a grid the problem is that I want to disable the ToolStripMenuItem in context menu according to the user previlages.How can i do that. i have done like this but it is not working

  private void contextMenuStrip_Machine_Opening(object sender, CancelEventArgs e)
        {
              toolStripAuthorize.Enabled = INFOpermission.accessAuthorize;
        } 

but it is not working

© Stack Overflow or respective owner

Related posts about c#

Related posts about Windows