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
265
First right click on Ultragrid (with all menu items in ContextMenuStrip set to Visible = False) displays narrow line
posted

Hi,

Suppose we have ContextMenuStrip defined for the UltraGrid. There are 3 menuitems(menu1, menu2, menu3) in ContextMenuStrip.

In .Open event of ContextStripMenu we make Visible property of all 3 buttons False. Then on First right click of mouse we see a narrow line.

Can you please suggest how to overcome it? I don't want to see anything if for all items in menustrip Visible = False.

Parents
No Data
Reply
  • 4625
    Offline posted

    Hello Nitin,

    Thank you for contacting Infragistics!
    Please see the sample I am sending you attached to this email.
    In the handler of ContextMenuStrip Opening Event I am checking if all items in the ContextMenuStrip are equal to false, then the event is being canceled.
    This is one of the ways to prevent the rendering of empty ContextMenuStrip and its narrow line.

    I am looking forward for your answer.

    UltraGridContextMenuStripSample.zip
Children