We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

On selection of ComboBox1 autofill ComboBox2 with data

Essentially, I'm looking for a way to pick data out of ComboBox1 from a select statement and upon that selection, autofill Combobox2 with data from the same select

So, if box1 is LastName I'd want FirstName to come up but I'm not 100% on how to get them to talk to each other. Any help would be appreciated. 

1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team September 18, 2019 04:19 AM

Hi Bill Faries,  
Good day to you. 
You can set value for second ComboBox through select event of first ComboBox based on the selected value. Please refer to the following code 
Giving To<br /> 
                <ej:ComboBox ID="givingTo" runat="server"  Width="300px" Placeholder="Give To" AutoFill="true" DataValueField="Value" DataTextField="Text" ClientSideOnSelect="onSelect"> 
                <br /> 
                What Type of McMention?    
            <ej:ComboBox ID="Combo" runat="server" Width="300px" DataTextField="Text" DataValueField="Value" Placeholder="Select "> 
        function onSelect(args) { 
            if (args.value == "4") { 
                var obj = $("#<%=Combo.ClientID%>").data("ejComboBox"); 
                obj.setModel({ value: "4" }); 
We have attached a sample for your reference which can be downloaded from the following link 
Could you please check the sample and get back to us, if you require any further assistance on this? 
Ashokkumar B. 

Live Chat Icon For mobile
Up arrow icon