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

Related ComboBoxes

3 Answers 54 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Y
Top achievements
Rank 1
Y asked on 26 Sep 2011, 09:35 AM

Hi telerik,

 

  I use two Related ComboBoxes ,but when I set the combobox can input for search,the combobox will just  load one item,and when I click anywhere then click combobox, it will load all items...
  I use your livedemo "ComboBox / Related ComboBoxes " , I change the RadComboBox2 can input and search is also have this bug.

Your code:

<telerik:RadComboBox ID="RadComboBox2"
                runat="server" 
                EnableViewState="false"
                Width="186px" 
                CssClass="ComboBox_Countries" 
                OnClientSelectedIndexChanging="LoadCities" 
                OnClientItemsRequested="ItemsLoaded"
                OnItemsRequested="RadComboBox2_ItemsRequested" />

I changed to ( I add EmptyMessage EmptyMessage):
<telerik:RadComboBox ID="RadComboBox2"
    runat="server" 
    EnableViewState="false"
    Width="186px" 
    CssClass="ComboBox_Countries" 
    OnClientSelectedIndexChanging="LoadCities" 
    OnClientItemsRequested="ItemsLoaded"
    EmptyMessage="Search for address..." 
    EmptyMessage="Contains"
    OnItemsRequested="RadComboBox2_ItemsRequested" />

Please help.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Sep 2011, 09:58 AM
Hello,

Please take a look into the following demo which explains the same functionality.
ComboBox / Related ComboBoxes.

Thanks,
Princy.
0
Y
Top achievements
Rank 1
answered on 26 Sep 2011, 10:32 AM
Thanks reply.
 I know this demo,but I want the Combobox can input and search. But when I change the combobox can input , it will have bug.
 
0
Ivana
Telerik team
answered on 27 Sep 2011, 03:46 PM
Hi Y,

I have tested the Related RadComboBox's example and it is working as expected.

In that example, if you have the AllowCustomText property set to "true" in the Countries RadComboBox, you will be able to type only the ContinetID's in its input field.The same happens with the Cities RadComboBox,you could only type the id's of the countries in its input field.
That is happening because the RadComboBoxes are loaded on demand and if you want to search the countries by text  in the Countries RadComboBox, you could make an additional query where you will have the id of the currently selected continent and select all the countries in it.

Please take a look at the Countries table of the database the online demo is using to see how it is organized.

You could also take a look at the online help article bellow which explains the essentials of the load on demand mechanism of the RadComboBox: Load On Demand Overview.

Greetings,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ComboBox
Asked by
Y
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Y
Top achievements
Rank 1
Ivana
Telerik team
Share this question
or