Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > populate 2 combobox
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Answered populate 2 combobox

Feed from this thread
  • Yann avatar

    Posted on Jun 29, 2011 (permalink)

    hi,
    I'm new in telerik forum, my name is Yann.

    I have a problem, I have a web page with 2 combobox,  the data of both combox comming from a ObjectDataSource and I would change the data of my second combobox (combox2)  in relation of the data comming from my first combobox (combox1), like this:

    <asp:ObjectDataSource ID="odsState" runat="server" SelectMethod="viewAllStato" TypeName="wrState.State"></asp:ObjectDataSource>

     

    <asp:ObjectDataSource ID="odsCanton" runat="server"

    SelectMethod="viewCantoneByStato" TypeName="wrCanton.Canton">

    <SelectParameters>

    <asp:ControlParameter ControlID="rcbState" DefaultValue="" Name="idStato"

    PropertyName="OnClientDropDownClosed" Type="Int32" />

    </SelectParameters>

    </asp:ObjectDataSource>


    with my 2 combobox:
    <telerik:RadComboBox ID="rcbState" runat="server" DataSourceID="odsState" DataTextField="nomeStatoEN" DataValueField="id"></telerik:RadComboBox><br />

    <telerik:RadComboBox ID="rcbCanton" runat="server" AutoPostBack="True"

    DataSourceID="odsCanton" DataTextField="nomeCantoneEN" DataValueField="id"></telerik:RadComboBox>

    someone please could help me ? thx

  • Answer Princy MVP avatar

    Posted on Jun 29, 2011 (permalink)

    Hello Yan,

    Please check the following demo for the needed approach.
    ComboBox / Related ComboBoxes.

    Thanks,
    Princy.

  • Yann avatar

    Posted on Jun 29, 2011 (permalink)

    hi, thx for your answare.

    I have a problem here:
    // in this event all client objects
    // are already created and initialized
    countriesCombo = $find("<%= RadComboBox2.ClientID %>");
    citiesCombo = $find("<%= RadComboBox3.ClientID %>");

    betweend <%= %> with my data:

    cityCombo = $find(

     

    "<%= rcbCity.id %>");

    cantonCombo = $find(

     

    "<%= rcbCanton.id %>");


Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > populate 2 combobox