add items to dropdownlist from database

2 posts, 0 answers
  1. ahmed
    ahmed avatar
    14 posts
    Member since:
    Feb 2018

    Posted 14 Mar 2018 Link to this post

    I want to add result of sql query to dropdownlist items


     have tried this :


    RadListDataItem dataItem = new RadListDataItem();
                                dataItem.Text = (read1["size"].ToString());

  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4125 posts

    Posted 15 Mar 2018 Link to this post

    Hello, Ahmed, 

    Thank you for writing.  

    In order to populate RadDropDownList with data you have two approaches:

    1. Add the items programmatically to the Items collection:

    2. Bind RadDropDownList:

    You can also refer to our Demo application >> DropDown & List >> DropDownList >> DataBinding example. The Demo application can be found in the installation folder of the suite. 
    I hope this information helps. Should you have further questions I would be glad to help. 
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top