Problem with template buttons in code behind

A J

We have a RadToolbBar where we need to pro grammatically insert some buttons in the code behind. It works for the most part, except for buttons with an ItemTemplate. The toolbar is defined in the ASPX markup and has some buttons already. E.g.,

This appears to be working. However, we have buttons that use an ItemTemplate (using an ITemplate with an InstantiateIn method defined). These only work if we add to the end of the toolbar (toolbar.Items.Add(btn)), but not on Insert (toolbar.Items.Insert(0, btn)).

How do you insert a button with an ItemTemplate to the beginning of a statically defined RadToolbar?

Plamen

I have tested the described scenario and is worked correctly at my side. I am attaching the sample page that I used. Please review it and let me know if something else should be added or done in order to replicate the issue.

Regards,
Plamen
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.