Sharing datasources

2 posts, 0 answers
  1. Thomas Yanez
    Thomas Yanez avatar
    8 posts
    Member since:
    Dec 2009

    Posted 11 Aug 2014 Link to this post

    Is there a way to share a datasource with multiple on-demand RadComboBox that are dynamically generated (not in a repeater)?  I guess I am asking if this should be possible, and I am just missing a clue?  If it is, is there an example that demonstrates a working version of this?

    A simple version of what I am trying to accomplish would be to just populate a page with 10 pairs of linked on-demand RadComboBoxes (each pair consists of a "header" and a "detail" set of data) that use the same datasource (not a web service, just a straight SqlDataSource.)
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 14 Aug 2014 Link to this post

    Hello,

    Straight to your question - let's assume that you have two related RadComboBox control on your page. First RadComboBox will list the continents and the second RadComboBox will list the countries for the selected continent based on the first RadComboBox selection. In this case the data source for the second data source will filtered - this data source will contain only countries for the selected continent.

    Then we add another pair of two RadComboBox controls on the page and  you bind these RadComboBox controls to the same data source controls used for  the RadComboBox controls in the first pair. Then the second RadComboBox control will be populated with the same filtered countries since the data source is already filtered by selecting a continent from the first RadComboBox in the fist pair.

    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top