Hi all
I am digging deeper and deeper into the world of Kendo, encountering new challenges behind each corner ... :-)
I am now trying to implement two cascading dropdown lists similar to the demo.
However I cannot replicate the behavior of the demo, and I am looking to encounter this challenge.
The demo contains three dropdownlists, of which initially two are disabled.
When I select an option in the first, the second will be enabled and I can see some options connected to the selected option.
The datasources are independent webservices which are queried on the moment of rendering the page or later (this is not clear to me).
I assume the second dropdownlist is populated on rendering, and filtered upon enabling it.
I have tried to implement two cascading dropdowns, of which both are enabled from the start.
Both are populated from the startm and there is no filtering at all.
This is my code:
- how is the value selected in the first dropdownlist passed to the second dropdownlist?
- why is the second dropdownlist not disabled (as in the sample)?
The scripts I am using, are:
Looking forward to your help!
Henk Jelt
I am digging deeper and deeper into the world of Kendo, encountering new challenges behind each corner ... :-)
I am now trying to implement two cascading dropdown lists similar to the demo.
However I cannot replicate the behavior of the demo, and I am looking to encounter this challenge.
The demo contains three dropdownlists, of which initially two are disabled.
When I select an option in the first, the second will be enabled and I can see some options connected to the selected option.
The datasources are independent webservices which are queried on the moment of rendering the page or later (this is not clear to me).
I assume the second dropdownlist is populated on rendering, and filtered upon enabling it.
I have tried to implement two cascading dropdowns, of which both are enabled from the start.
Both are populated from the startm and there is no filtering at all.
This is my code:
<% Using Html.BeginForm()%> <div id="legent"> </div> <div id="numbers" disabled="disabled" > </div> <input type="submit" value="choose" name="r1"/> <%end using %> <script> $(document).ready(function () { $("#legent").kendoDropDownList({ optionLabel: "Legent...", dataTextField: "Name", dataValueField: "Id", dataSource: { transport: { read: { type: "GET", contentType: "application/json; charset=utf-8", url: "http://jason.platform4telecom.com/JsonProfiling/enableme/test%5Eoneoverview%5Ecom/abc/xyz", jsonpCallbackString: "mycallback", dataType: "jsonp" } }, } }); var numbers = $("#numbers").kendoDropDownList({ autoBind: false, cascadeFrom: "legent", optionLabel: "Select product...", dataTextField: "Identifier", dataValueField: "Custnr", dataSource: { transport: { read: { type: "GET", contentType: "application/json; charset=utf-8", url: "http://jason.platform4telecom.com/JsonProfiling/FindNumbers/test%5Eoneoverview%5Ecom/abc/xyz", jsonpCallbackString: "mycallback", dataType: "jsonp" } } } }).data("kendoDropDownList"); }); </script> I follow exactly the sample on the site; nevertheless it is not working. I have following questions:- where is the filtering taking place?
- how is the value selected in the first dropdownlist passed to the second dropdownlist?
- why is the second dropdownlist not disabled (as in the sample)?
The scripts I am using, are:
<script src="/Content/kendo_scripts/console.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script> <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css" rel="stylesheet" /> <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.mobile.all.min.css" rel="stylesheet" />
Looking forward to your help!
Henk Jelt