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

How to Cascade DropDownListFor to other DropDownListFor?

Thread ID:





128199 Jan 7,2017 12:50 PM UTC Jan 9,2017 09:23 AM UTC ASP.NET MVC 1
Tags: DropDownList
Asked On January 7, 2017 12:50 PM UTC

Hi everybody!

When I'm trying cascade DDLF to another DDLF, I get "Uncaught ejDropDownList: methods/properties can be accessed only after plugin creation"

Prince Oliver [Syncfusion]
Replied On January 9, 2017 09:23 AM UTC

Hi John,   
Thanks for contacting Syncfusion Support.   
We were unable to reproduce the console error, "Uncaught ejDropDownList: methods/properties can be accessed only after plugin creation" at our end. We have prepared a sample for cascading two DropDownListFor controls. Have a look at the below code snippet.   
View Code:   
<div class="col-xs-8 col-sm-4">   
            <span class="txt">Select Group</span>   
            @Html.EJ().DropDownListFor(model => model.auto1, (Syncfusion.JavaScript.Models.DropDownListProperties)ViewData["ddl"]).CascadeTo("Name").ClientSideEvents(e => e.Change("onChange")).WatermarkText("Select")   
        <div class="col-xs-8 col-sm-4">   
            <span class="txt">Select Country</span>   
            @Html.EJ().DropDownListFor(model => model.Name, (Syncfusion.JavaScript.Models.DropDownListProperties)ViewData["ddl1"]).Enabled(false)   
<script type="text/javascript">   
        function onChange() {   
            var ctry = $('#Name').data("ejDropDownList");   
Controller Code:   
public ActionResult DropdownlistFeatures()   
            DropDownListProperties ddl = new DropDownListProperties();   
            ddl.DataSource = GetDataSource();   
            DropDownListFields ddf = new DropDownListFields();   
            ddf.Text = "text";   
            ddf.Value = "parentId";   
            ddl.DropDownListFields = ddf;   
            ViewData["ddl"] = ddl;   
            DropDownListProperties ddl1 = new DropDownListProperties();   
            ddl1.DataSource = GetDataSource1();   
            DropDownListFields ddf1 = new DropDownListFields();   
            ddf1.Text = "text";   
            ddf1.Value = "value";   
            ddl1.DropDownListFields = ddf1;   
            ViewData["ddl1"] = ddl1;   
            return View();   
We have attached the sample for your convenience, refer to the following sample link:http://www.syncfusion.com/downloads/support/forum/128199/ze/DropdownlistForCascade746551743   
If the issue still persists, please provide an issue reproducing sample along with the replication steps. It will help us to isolate the root cause and provide a solution.   


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