Radpanel itemclick - reloads entire page

2 posts, 0 answers
  1. PV
    PV avatar
    59 posts
    Member since:
    Nov 2009

    Posted 22 Oct 2010 Link to this post

    Hello Team,

    I have a Radpanelbar on a aspx and 5 items, and when clicked on item, a usercontrol is displayed in the div (that is made visible in the event OnItemClick).

    The issue that is occuring is, when I click on one item, the entire is refreshed and all the usercontrol's pageload event is fired on the page.

    I am looking at an approach where only the one user control to be loaded on click of one item instead of entire page refresh.

    Radpanel looks like:

    <telerik:RadPanelBar ID="pnlNav" runat="server" Width="180" OnItemClick="pnlNav_ItemClick"
                            EnableEmbeddedSkins="false" >
                                <telerik:RadPanelItem Text="UserControl1" Value="UserControl1" Expanded="true"
                                    PreventCollapse="true" ExpandedImageUrl="">
                                <telerik:RadPanelItem Text="UserControl2" BackColor="#608DC8" Value="UserControl2" />
                                <telerik:RadPanelItem Text="UserControl3" Value="UserControl3" />
                                <telerik:RadPanelItem Text="UserControl4" Value="UserControl4" />

     protected void pnlNav_ItemClick(object sender, RadPanelBarEventArgs e)

     switch (e.Item.Value)

                    case "UserControl1":
                        this.UserControl1.Visible = true;
                    case "UserControl2":
                        this.divUserControl1.Visible = true;
                        this.ucUserControl1.Load();//public method
                    case "UserControl3":
                      ----//same code
                    case "UserControl4":
                       same code

    Please provide any pointers if i am missing anything

  2. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 27 Oct 2010 Link to this post

    Hello PV,

    My suggestion would be to use RadAjaxManager.
    Here is a reference for it in our help documentation: http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
    Here is the first of many demo's in demos.telerik.com in the section for RadControls for ASP.NET AJAX: http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/firstlook/defaultcs.aspx

    Hope this is going to help you!

    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top