possible RadToolbarTemplateButton bug

3 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    11 posts
    Member since:
    Oct 2007

    Posted 21 Oct 2009 Link to this post

    Need som help.
    I am using Telerik RAD Controls Q2 2007 in our AJAX enabled web application. In one of the user controls I am using the a RadToolbar, which contains some  RadToolbarTemplateButtons. These RadToolbarTemplateButtons wrapping around other web controls (asp:DropDownList, rad:RadDatePicker), but these web controls are not accessible from code behind. As I found out none of the web controls inside the RadToolbarTemplateButton are added to the designer.cs files in Visual Studio. The layout in teh markup looks as below:
    <radTlb:RadToolbarTemplateButton ID="RadToolbarTemplateButton3" runat="server"
                    <radCln:RadDatePicker ID="dpDatePicker" runat="server" Width="105px" DateInput-ReadOnly="true" 
                        DateInput-Skin="None" Calendar-Skin="Web20" 
                        Calendar-SkinsPath="/" DateInput-SkinsPath="/"
                        <ClientEvents OnDateSelected="BroadcastDateChange" /> 

    As you can see all the necessary attributes are present (IDs and such), but none of the content in RadToolbarTemplateButton3 is present in the designer.cs file, thus making it impossible to use the user control and acess the RadToolbarTemplateButton  content.
    I already reinstalled VS 2005 and added all the controls to the user controls page from scratch.
    If I try to add any controls outside of the rad:RadToolbar they are fine and auto generated in designer.cs correctly. Frankly this is very very annoying as I am not able to use the user control.
    thanks for any suggestion and help.
  2. Vesko
    Vesko avatar
    122 posts
    Member since:
    Mar 2009

    Posted 26 Oct 2009 Link to this post

    You need to find the button first (e.g. by using FindButtonByText) and then use the FindControl to find any embedded control in it.
    This is how it works on every templated control.
  3. Benjamin
    Benjamin avatar
    11 posts
    Member since:
    Oct 2007

    Posted 27 Oct 2009 Link to this post

    yeah you are right. I just used that way and it works, however, it is indeed interesting how the control content is created in the template. thanks
Back to Top