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

TextB in RadToolbar with Ajax AutoCompleteExtender

2 Answers 87 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Ralf Markus
Top achievements
Rank 1
Ralf Markus asked on 24 Jul 2009, 07:27 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 28 Jul 2009, 11:31 AM
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.
0
Ralf Markus
Top achievements
Rank 1
answered on 04 Aug 2009, 09:20 AM
Hi Alex,

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

Thanks again,

Ralf

Tags
ToolBar
Asked by
Ralf Markus
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Ralf Markus
Top achievements
Rank 1
Share this question
or