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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Undefined Value in cascading dropdownlist

Thread ID:





128831 Feb 11,2017 06:02 PM UTC Feb 13,2017 12:14 PM UTC ASP.NET Web Forms 5
Tags: DropDownList
Asked On February 11, 2017 06:02 PM UTC

I have two dropdownlist, one with letter of buildings and second with number of rooms

I create two data tables like in example :

//Display letter of buildings

public DataTable MyBuilding()


string connection = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

string cmd = "select Building from Apartaments group by Building";

SqlDataAdapter sda = new SqlDataAdapter(cmd, connection);

DataTable dt = new DataTable();


return dt;


//Display room s in building

public DataTable MyRoom(string build)


string connection2 = ConfigurationManager.ConnectionStrings["Intra2016ConnectionString"].ConnectionString;

string cmd2 = "select NoRoom, ApartId from Apartaments where Building = @Buildi";

SqlDataAdapter sda2 = new SqlDataAdapter(cmd2, connection2);

sda2.SelectCommand.Parameters.AddWithValue("Buildi", build);

DataTable dt = new DataTable();


return dt;

//And COde to execute

protected void ejddl1_ValueSelect(object sender, Syncfusion.JavaScript.Web.DropdownListEventArgs e)

ejddl2.DataSource =
string ejmb = e.SelectedText;
ejddl2.DataSource = MyRoom(ejmb);



With asp controls I don´t have any problem.

Replied On February 11, 2017 06:04 PM UTC

This is the text loosing when submit my post

Run application and do first selection in building dropdownlist every is ok I see rooms corresponding to this building, but changing selection, in room ddl all value display like undefined. I’m testing different option – included sql direct  result is every time the same.

Replied On February 11, 2017 07:58 PM UTC

I'm testing binding data to dropdownlist like below:

Intra2016Entities db = new Intra2016Entities();

List<Apartaments> Apart = new List<Apartaments>();

Apart = db.Apartaments.Where(d => d.Building == e.Text).ToList(); // I testing with differents values - e.Value; e.SelectedText ..etc

ejddl2.DataSource = Apart;

and look value from selected events and that what I see everything is ok:


but result in room ddl is the same - undefined value


Karthikeyan Viswanathan [Syncfusion]
Replied On February 13, 2017 04:45 AM UTC

Hi Tomasz, 
Thanks for contacting Syncfusion support.    
We have created branch incident related this query. Can you please follow up that incident.  
Please find the link:  
Karthikeyan V.  

Replied On February 13, 2017 09:16 AM UTC

Thanks for the answer and your help

Karthikeyan Viswanathan [Syncfusion]
Replied On February 13, 2017 12:14 PM UTC

Hi Tomasz,  
Thanks for the update.  
We are glad the suggestion helped you to achieve your requirement.  
Karthikeyan V.


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