Search code examples
winformsdevexpressmdimdichildmdiparent

How to change the ribbon groups dynamically based on the mdi child form?


I have a base form with devexpress ribbon control and an xtratabbedmdimanager with one datagridview in one of the tabs. Double-clicking the datagrid row, opens new tab form.

Is it possible when opening the new mdi child form to change the ribbon groups? Hide one ribbon group and appear a new one based on the mdi child form in the tab?

Thank you in advance!


Solution

  • This should be happening automatically if you are assigning the ribbon groups to the child form and not the parent. Ribbon groups from the parent should show all of the time, and when you switch from one child form to the other, only the ribbon items for that child form should show along side the parent groups.

    To enable this behavior, if it's not already done so, set the MdiMergeStyle property of the ribbon on the parent form to Always.