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. Image for the cookie policy date
close icon

DropDownLists not populating

I have 3 drop down lists in this example. Lists 1 & 2 don't databind/populate. List3 works as intended. I don't understand what I have done wrong with Lists 1& 2.
@{
    IEnumerable<VenueViewModel> ddlDataSource = (IEnumerable<VenueViewModel>)ViewBag.ddl_ds;
}

@Html.EJ().DropDownList("venueList1").Datasource(ddlDataSource).DropDownListFields(df => df.Text("VenueName")).ShowRoundedCorner(true).Enabled(true).WatermarkText("Select a Venue")
@Html.EJ().DropDownList("venueList2").Datasource((IEnumerable<VenueViewModel>)ViewBag.ddl_ds).DropDownListFields(df=>df.Text("VenueName")).ShowRoundedCorner(true).Enabled(true).WatermarkText("Select a Venue")
@Html.EJ().DropDownList("venueList3").TargetID("vlist").ShowRoundedCorner(true).Enabled(true).WatermarkText("Select a Venue")

    <div id="vlist">
        <ul>
            @foreach (var v in ddlDataSource)
            {
                <li>@v.VenueName, @v.Weekday, @v.VenueId</li>
            }

As always, any help is appreciated.

Thanks,
Chris

        </ul>
    </div>

3 Replies

KV Karthikeyan Viswanathan Syncfusion Team April 24, 2017 06:15 AM UTC

Hi Chris,  
 
Thanks for contacting Syncfusion support.  
 
We were unable to reproduced your reported issue. All the dropdown list controls are working fine. So, could you please revert us the shared sample as issue reproducible one. It will be helpful as to provide a solution at earlier.   
 


 
Regards,  
Karthikeyan V.  



AJ Andrew Jang September 11, 2017 10:21 PM UTC

In my case, I found out that some other control before the DropdownList was malfunctioning. 

After fixing other control problem, dropdownlist started working right away.



KR Keerthana Rajendran Syncfusion Team September 12, 2017 05:03 AM UTC

Hi Chris, 
 
Thanks for your update. We are happy to hear that your issue has been resolved. Please get back to us if you require any further assistance on this. We will be happy to assist you. 
 
Regards, 
Keerthana. 


Loader.
Live Chat Icon For mobile
Up arrow icon