connection to combobox

2 posts, 0 answers
  1. Johnny
    Johnny avatar
    86 posts
    Member since:
    Dec 2010

    Posted 28 Sep 2011 Link to this post

    i'm creating a few radcombobox inside the radpanelbar. i already make connection to database for 1st combobox. how can i do the other connection to other combobox?

    this is the 1st combobox for user

     <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" runat="server" Width="289px"

     Height="200px" DataSourceID="SqlDataSource1" DataTextField="UserName"

     EmptyMessage="Search for people...">


    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FingertipsConnectionString %>"

    SelectCommand="SELECT [UserName] FROM [AuditTrail] Order By UserName"></asp:SqlDataSource>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">


    <telerik:AjaxSetting AjaxControlID="RadComboBox2">


    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />




    </td> </tr>



    this is the 2nd combobox for database. this combobox i want to connect to database to get the content from column "database"

    <asp:Label runat="server" ID="databaseLabel" AssociatedControlID="RadComboBox3">Database:</asp:Label>



    <telerik:RadComboBox ID="RadComboBox3" AllowCustomText="true" runat="server" Width="289px"

     Height="200px" DataSourceID="SqlDataSource2"

     EmptyMessage="Search for database...">


      <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:FingertipsConnectionString %>"

     SelectCommand="SELECT [Database] FROM [AuditTrail]"></asp:SqlDataSource>


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2011 Link to this post

    Hello Johnny,

    You can set the DataText fielld property to the required filed (here Database) to show the text in RadComboBox.
    Also take a look into the following help article for more on this.
    Data Binding Overview.

Back to Top