TextB in RadToolbar with Ajax AutoCompleteExtender

3 posts, 1 answers
  1. Ralf Markus
    Ralf Markus avatar
    8 posts
    Member since:
    Mar 2009

    Posted 24 Jul 2009 Link to this post

    Hi @all!

    If I set the TargetControlID of the AutoCompleteExtender to the Textbox which is positioned in a Toolbar I get the Error that the control cannot be found. Does anyone know a solution to this?

    Thank you very much!


    <

     

    telerik:RadToolBar ID="rdtbSearchQualifications" runat="server" Width="100%"

     

     

    meta:resourcekey="rdtSelectionResource1"

     

     

    OnButtonClick="rdtbSearchQualifications_ButtonClick"

     

     

    Style="display: block; float: none">

     

     

    <CollapseAnimation Duration="200" Type="OutQuint" />

     

     

    <Items>

     

     

    <telerik:RadToolBarButton runat="server"  

     

     

    CommandName="SearchString" Width="150px">

     

     

    <ItemTemplate>

     

     

    <table cellpadding="0" cellspacing="0">

     

     

    <tr>

     

     

    <td>

     

     

    <asp:TextBox ID="tbSearchString" runat="server"

     

     

    meta:resourcekey="tbSearchStringResource1" Width="200px">

     

     

    </telerik:TextBox>

     

     

    </td>

     

     

    </tr>

     

     

    </table>

     

     

    </ItemTemplate>

     

     

    </telerik:RadToolBarButton>

     

     

     

    <telerik:RadToolBarButton runat="server"

     

     

    ImageUrl="~/_controltemplates/UserControls/SkillManagement/Resources/Images/Portfolio Add.png"

     

     

    meta:resourcekey="RadToolBarButtonResource10" Text="Search qualification" CommandName="searchQualification"

     

     

    Value="searchQualification" Width="150">

     

     

     

    </telerik:RadToolBarButton>

     

     

    </Items>

     

     

    </telerik:RadToolBar>

     

    <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtenderQualificationSearch"
        runat="server" 
        MinimumPrefixLength="1"
        CompletionSetCount="15"
        ServicePath="~/UserControls/SkillManagement/QualificationCatalog/Webservices/QualificationCatalog.asmx"
        ServiceMethod="SearchQualifications"
        TargetControlID="tbSearchString"
        CompletionListItemCssClass="DefaultText"
        CompletionListHighlightedItemCssClass="HeaderText"
        OnClientItemSelected="ClientStartQualificationSearch">
    </ajaxToolkit:AutoCompleteExtender>

    <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="tbSearchString" WatermarkText="Bitte Suchtext eingeben...">
    </ajaxToolkit:TextBoxWatermarkExtender>

  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 28 Jul 2009 Link to this post

    Hello Ralf,

    I guess that the extender cannot find the TextBox because it is nested within the ToolBar.

    You can try to:
    • trick the extender using a somewhat 'hacky' ID, such as rdtbSearchQualifications_tbSearchString
    • use a RadComboBox with AllowCustomText=true instead of the AutoCompleteExtender.

    We could provide more help if you supply a sample project through a support ticket.
    Sincerely yours,
    Alex
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ralf Markus
    Ralf Markus avatar
    8 posts
    Member since:
    Mar 2009

    Posted 04 Aug 2009 Link to this post

    Hi Alex,

    Thanks for your reply. This helped me very well. Now I´m using the Combobox with autocomplete functionality.

    Thanks again,

    Ralf

Back to Top