This is a migrated thread and some comments may be shown as answers.

merge commandbars

5 Answers 97 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
francis
Top achievements
Rank 1
francis asked on 17 Mar 2011, 10:21 AM
Hello, Is it possible to merge a commandbar from a child with the parent commandbar?
thanks,
francis

5 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 22 Mar 2011, 10:52 AM
Hi francis,

Yes, you can merge the command bars although there is no built-n functionality for this. I am not sure if you want to merge the strips or the items but using the proper collections this should not be a problem. For example if you want to merge the items of two or more CommandBarStripElements, you can get the items from the Items collection:
foreach(RadCommandBarBaseItem item in commandBarStripElement2.Items)
{
     commandBarStripElement1.Items.Add(item);
}
 
commandBarStripElement2.Items.Clear();


If you want to merge the strips of two or more RadCommandBars you can get all strips by traversing all rows and extracting them from their Strips collection:
foreach (CommandBarRowElement row in radCommandBar1.Rows)
{
    foreach (CommandBarStripElement strip in row.Strips)
    {
        radCommandBar2.Rows[0].Strips.Add(strip);
    }
    row.Strips.Clear();
}

I hope you find this useful. If you have any further questions, do not hesitate to ask.

All the best,
Ivan Todorov
the Telerik team
0
francis
Top achievements
Rank 1
answered on 24 Mar 2011, 09:38 PM
Hi Ivan,

Thanks for the reply.  I'm trying to merge a commandbar from a child form with the commandbar on a mdi parent form when the child form loads. can you provide example?

thanks
Francis
0
Ivan Todorov
Telerik team
answered on 30 Mar 2011, 11:23 AM
Hi francis,

You can find an example in the attached project.

I hope you find it useful. Please let me know if you need any further help.

Greetings,
Ivan Todorov
the Telerik team
0
Peter
Top achievements
Rank 2
answered on 25 Mar 2020, 08:38 PM

Hi,

I was wondering if in the meanwhile there are plans to provide built-in functionality to support merging for commandbar items. Often commandbar items are linked to menu items, and for menu items the merging is really first class functionality. Perhaps even a way to link a commandbar item to a menu item would be nice, because if e.g. a File / Save is disabled, you would also want the related save commandbar icon would be disabled.

Thanks.

Peter.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Mar 2020, 12:40 PM
Hello, Peter,

Currently, we don't have plans for introducing built-in functionality for merging RadCommandBar's items. However, if we have similar requests from other customers, we will consider improving RadCommandBar in future.

Meanwhile, feel free to use the suggested approach in the previous reply. 

Should you have further questions please let me know.

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
CommandBar
Asked by
francis
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
francis
Top achievements
Rank 1
Peter
Top achievements
Rank 2
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or