Bin to Viewbag

2 posts, 0 answers
  1. Allan
    Allan avatar
    34 posts
    Member since:
    Aug 2015

    Posted 16 Nov 2015 Link to this post

    ​Hi there, I was wondering if someone could help me.  How can I bind my dropdown list to a viewbag to ensure it's getting it's data from the right place?  I found a couple of guides but they didn't work for my scenario.  Here is my code.

    // #DDL - Broker Companies
          IEnumerable<SelectListItem> thestats = seabrokersData.tbl_requirement_status
              .Select(c => new SelectListItem
                  Value =,
                  Text = c.thet_status
          ViewBag.theStatus = theStatus;


    I would like my Kendo Dropdown to use the above viewbag to populate itself.  How can I do this?

    Many thanks




  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 18 Nov 2015 Link to this post

    Hello Allan,

    Indeed you can do that. Please use the following example as a base:



    Boyan Dimitrov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET AJAX bannerTelerik UI for ASP.NET Core is out
Back to Top