How to Prevent Attached Event When I Click Qat.MenuItem

Posted by: dnjsxmf on 25 October 2020, 7:31 pm EST

  • Posted 25 October 2020, 7:31 pm EST


    I am using C1.Win.C1Ribbon.2.dll (Version = 2.0.20113.351)

    I want to make a button like "Show Below the Ribbon" button in Qat (Quick Access Toolbar) dropdown Menu

    When I Add Ribbon button (I also add Click event in that) to Qat.MenuItem, It added to Qat dropdown Menu ( shown dropdown menu name is "Customize Quick Access Toolbar").

    if I click the Ribbon button, its click event is not called and it just Attached to left side of dropdown menu.

    How to Prevent Attaching and checkMark when I click that button in Qat dropdown menu.

    my expected work :
    1. I click my Qat menu Item ("ShowMsg").
    2. Its click event called (not attached left side, not show checkMark)

    private void Form1_Load(object sender, EventArgs e)
    RibbonButton button = new RibbonButton() { Text = "ShowMsg"};
    button.Click += Button_Click;

    private void Button_Click(object sender, EventArgs e)

    Thanks in advanced,
  • Replied 25 October 2020, 8:48 pm EST


    as far as I know, you can only attach buttons to the QAT that are contained in the ribbon. So, you would have to add the button to a RibbonGroup (or the ApplicatiopnMenu or the RibbonConfigToolbar) before adding it to the QAT.

    Best regards

  • Marked as Answer

    Replied 27 October 2020, 6:07 pm EST


    You can’t do what you mentioned in the “Customize Quick Access Toolbar” dropdown but as a workaround, you can add a split button to the Qat and then add items in its dropdown which will work as you mentioned. Please refer to the sample attached.

    @Wolfgang, thank you for your suggestion.

    Prabhat Sharma.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels