RadPanelBar DataBinding Q2 2010 SP2

4 posts, 0 answers
  1. kavitha
    kavitha avatar
    17 posts
    Member since:
    Oct 2010

    Posted 21 Apr 2011 Link to this post


      I am on Q2 2010 SP2. I have a rad panel declared like this.

    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Visible="true" EnableViewState="true">
        <telerik:RadPanelItem Expanded="true" Text="Transfer1" runat="server" Selected="true" PreventCollapse="true" style="font-size:10pt;font-weight:bold">
            <telerik:RadPanelItem Value="Transfer2" runat="server" Width="100%">
              <div style="background-color: #edf9fe">      
                <table width="100%">
                    <tr><td width="15%"><b>Order Number : </b></td><td align="left" width="40%"><b><asp:Label ID="lblOrderNumber" runat="server" Text='<%#Bind("OrderNumber")%>'></asp:Label></b></td><td>Customer ID:</td><td align="left"><asp:Label ID="lblCustomerID" runat="server" Text='<%# Bind("CustomerID")%>'></asp:Label></td></tr>               

    Is it possible to Bind the "Transfer2" RadPanelItem to a Datatable  and have the ORderNumber and CustomerID fields set from the first row in the Datatable?

  2. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 22 Apr 2011 Link to this post

    Hi Kavitha,

    You need to bind the PanelBar, not only the PanelItem.

    Here is a nice article on templates in RadPanelBar: http://www.telerik.com/help/aspnet-ajax/panelbar-templates-overview.html

    Also, you can check an alternative way of binding expressions which are getting values of items properties (in the example from the RadPanelItem.Value property) here: http://www.telerik.com/help/aspnet-ajax/panelbar-templates-binding.html

    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. kavitha
    kavitha avatar
    17 posts
    Member since:
    Oct 2010

    Posted 25 Apr 2011 Link to this post

    This is using Static binding, Could you give an example to bind the RadPanelBar to a DataTable and bind controls withing RadPanelItem to columns in the DataTable. I can't seem to get this to work.

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

    Posted 26 Apr 2011 Link to this post

    Hello Kavitha,

    RadPanelBar fully supports binding to a wide range of datasources:

    • DataSet.
    • DataTable.
    • DataView.

    Take look at the following demo and help article.
    Hierarchical Data Binding
    Binding to DataSet, DataTable, and DataView

Back to Top