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

Two RadComboBoxes per row inside a Repeater

3 Answers 34 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ambu
Top achievements
Rank 1
Ambu asked on 12 Aug 2008, 01:17 PM
I have two RadComboBoxes per row inside a Repeater. Would someone please tell me the correct syntax for using AJAX to change the focus to the second ComboBox when a selection is made in the first ComboBox?

-Allan

3 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 13 Aug 2008, 08:18 AM
Hello Allan,

You can subscribe to the OnClientSelectedIndexChanged event of the first combo and in its handler you have to find the second combo and move the focus to it as described here:
Focus the combobox on the client-side

I hope this helps.

Greetings,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ambu
Top achievements
Rank 1
answered on 13 Aug 2008, 12:02 PM

The focus never seems to move to the second RadComboBox. My code is below:

            <telerik:RadComboBox ID="RadComboBox1" Width="200" AutoPostBack="true" runat="server" 
                OnClientSelectedIndexChanged="OnClientSelectedIndexChanged">  
            </telerik:RadComboBox> 
            <br /> 
            <br /> 
            <telerik:RadComboBox ID="RadComboBox2" Width="200" runat="server">  
            </telerik:RadComboBox> 
function OnClientSelectedIndexChanged(sender, eventArgs)  
{  
    var comboBox = $find("<%=RadComboBox2.ClientID %>");  
    var input = comboBox.get_inputDomElement();  
    input.focus();  
    alert("TEST");  

0
Veselin Vasilev
Telerik team
answered on 15 Aug 2008, 02:52 PM
Hello Allan,

I have attached a sample project that demonstrates how to accomplish the task. Please download it and give it a try.

All the best,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Ambu
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Ambu
Top achievements
Rank 1
Share this question
or