Hi.
I have reviewed the documentation dropdownlist and I have not been able to resolve the following situation:
My web service returns me a JSON object of the form as shown in the image. As you can see is what companies have branches and my json object already has reinforced that. But I tried to do with the dropdownlist and yet I can not. Only companies achieving load but not the children belonging to them. This is my code:
HTML
<div id="selectMenu" data-role="view" data-title="Emp-Suc" data-init="selectInit"> <div data-role="header"> <div data-role="navbar"> <a data-role="backbutton" href="#:back" data-align="left">Atras</a> Emp-Suc </div> </div> <ul data-role="listview" data-style="inset"> <li> CompaƱia <select id="company"> </select> </li> <li> <select id="branch"> </select> Sucursal </li> </ul> </div>javascript
function selectInit(){ $("#company").kendoDropDownList({ dataSource: selectMenu_model.getUserBranch(selection_view_model), dataTextField: "Company", dataValueField: "CompanyId" }); $("#branch").kendoDropDownList({ cascadeFrom: "company", dataTextField: "Branch.Name", dataValueField: "Branch.BranchId", dataSource: selectMenu_model.getUserBranch(selection_view_model), autoBind: false }); }I would appreciate a response. Thanks