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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

On selection of ComboBox1 autofill ComboBox2 with data

Thread ID:

Created:

Updated:

Platform:

Replies:

147627 Sep 18,2019 01:09 AM UTC Sep 18,2019 09:19 AM UTC ASP.NET Web Forms 1
loading
Tags: ComboBox
Bill Faries
Asked On September 18, 2019 01:09 AM UTC

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. 

Ashokkumar Balasubramanian [Syncfusion]
Replied On September 18, 2019 09:19 AM UTC

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"> 
                </ej:ComboBox> 
 
                <br /> 
                What Type of McMention?    
            <ej:ComboBox ID="Combo" runat="server" Width="300px" DataTextField="Text" DataValueField="Value" Placeholder="Select "> 
            </ej:ComboBox> 
   <script> 
        function onSelect(args) { 
 
            if (args.value == "4") { 
                var obj = $("#<%=Combo.ClientID%>").data("ejComboBox"); 
                obj.setModel({ value: "4" }); 
            } 
 
        } 
    </script> 
 
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? 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon