Cascade

I am trying to do a cascading comboBox using an WebAPIAdaptor.  When I call dataBind() in JavaScript nothing seems to happen.


Attachment: ComboBoxTest_10dd1bbb.zip

1 Reply

KV Karthikeyan Viswanathan Syncfusion Team August 6, 2018 10:57 AM UTC

Hi Dave,   
  
Thanks for contacting Syncfusion Support.   
  
In ComboBox, component has to make a request to server, once the dropdown button clicked or type a text into combobox. The data will be bind after the action success.   
  
Please refer to the below code example:   
  
<code>   
  
function onCustomerChange(args) {   
        /// <summary>   
        /// Ons the customer change.   
        /// </summary>   
        /// <param name="args">The arguments.</param>   
        /// <returns></returns>   
        debugger   
        jobObj = document.getElementById('jobList').ej2_instances[0];   
        jobObj.dataSource = new ej.data.DataManager({ url: "/Api/JobNumbers/" + args.itemData.Id, adaptor: new ej.data.WebApiAdaptor(), crossDomain: true });   
        //jobObj.dataSource.url = "/Api/JobNumbers/" + args.itemData.Id;   
           
        jobObj.value = null;   
        jobObj.text = null;   
        jobObj.dataBind();   
        jobObj.enabled = true;   
   
   
   
    }   
  
</code>   


 
 
Regards,   
Karthikeyan V, 



Loader.
Up arrow icon