Binding RadPanelBar generates "DataSource not set" since 2014.1.225

3 posts, 0 answers
  1. Veronique
    Veronique avatar
    19 posts
    Member since:
    Jul 2011

    Posted 03 Apr 2014 Link to this post

    I get a "DataSource not set" error when I bind a RadPanelBar.
    To reproduce the bug, it must contain a RadPanelItem that contains a RadAutoCompleteBox.
    The problem appeared in version 2014.1.225 and is still visible in the hotfix 2014.1.326

    protected string RadPanelItemValue = "RadPanelItem1";
    protected void Page_Load(object sender, EventArgs e)
        if (!Page.IsPostBack)
            RadPanelBar1.DataBind(); // Generates an error: "DataSource not set"

    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" >
            <telerik:RadPanelItem Value='<%# RadPanelItemValue %>' >
                    <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1"></telerik:RadAutoCompleteBox>
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Apr 2014 in reply to Veronique Link to this post

    Hi Veronique,

    By default the AutoComplete functionality is enabled for every character you enter, the data from the DataSource that matches with the search text will be displayed in a drop down. So if you have not set any DataSourceID in the RadAutoCompleteBox, the control will display a message as you described since it does not have any idea from where the matching entries should be populated in the drop down. To avoid this error you need to set the DataSource to the RadAutoCompleteBox as follows.

        <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" DataSourceID="SqlDataSource1" DataTextField="OrderID">

  3. DevCraft R3 2016 release webinar banner
  4. Veronique
    Veronique avatar
    1 posts
    Member since:
    Mar 2014

    Posted 04 Apr 2014 in reply to Shinu Link to this post

    Setting the DataSource client side solves the issue.
Back to Top