Populating RadPanelBar with data and set RadPanelItem enable property dynamically

5 posts, 1 answers
  1. usr9999
    usr9999 avatar
    41 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    I am populating RadPanelBar from the database. The following is my code.  I have a db column that specifies enable true or false. I would like to set the RadPanelItem enable property using this. How can I do this?


    dt As New DataTable

    dt =GetPanelItems(Id) – proc to call oracle

    Dim links As New DataSet()



            RadPanelBar1.DataTextField = "panel_name"

            RadPanelBar1.DataNavigateUrlField = ""

            RadPanelBar1.DataFieldID = "panel_id"

            RadPanelBar1.DataFieldParentID = "Parent_panel_Id"

            RadPanelBar1.DataValueField = "panel_value"

            RadPanelBar1.DataSource = links


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

    Posted 09 Jul 2010 Link to this post


    You can perform this in ItemDataBound event of RadPanelBar.

    I hope this documentation is enough for you in accomplishing this.

  3. usr9999
    usr9999 avatar
    41 posts
    Member since:
    Jun 2010

    Posted 09 Jul 2010 Link to this post

    Thank you. It works.
  4. 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?

  5. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 22 Apr 2011 Link to this post

    Hello 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.

Back to Top