PanelBar Load on demand with grid

4 posts, 0 answers
  1. Sunny
    Sunny avatar
    31 posts
    Member since:
    Aug 2009

    Posted 26 Oct 2009 Link to this post

    Hi,

    I have RadPanelbar (populating from database) and inside each panelbar item I am loading a radgrid (which is in usercontrol) with unique parameters for each panelbar item. The Grid contains few hundred records, and I am using radwindow to insert/edit items in the radgrid.

    In this case, How can I improve the performance for the Panelbar with load on demand feature?


    Thanks

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 26 Oct 2009 Link to this post

    Hi TelNew,

    Yes, this is what we would suggest to use for this case.

    Regards,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sunny
    Sunny avatar
    31 posts
    Member since:
    Aug 2009

    Posted 26 Oct 2009 Link to this post

    Paul,

    Thanks for immediate response. But the sample loading user control, based on panelbar text. 

    In my case, in aspx page load I am (see code below).

    SomeControl.ascx contains a Self-Referencing Hierarchical RadGrid which populates data based on value from RadPanel (e.Item.Value)
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
    RadPanelBar2.ExpandMode = PanelBarExpandMode.FullExpandedItem 
    RadPanelBar2.DataFieldID = "" 
    RadPanelBar2.DataFieldParentID = "ID1" 
    RadPanelBar2.DataTextField = "Name" 
    RadPanelBar2.DataValueField = "Text" 
    RadPanelBar2.DataSource = MyDS 
    RadPanelBar2.DataBind() 
    If Not Page.IsPostBack Then 
        RadPanelBar2.Items(0).Expanded = True 
    End If 
    End Sub 
     
     
    Private Sub RadPanelBar2_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelBar2.ItemDataBound 
    Dim radPnlItem As New RadPanelItem 
    Dim smControl As SomeControl 
    smControl = CType(LoadControl("MyControls/SomeControl.ascx"), SomeControl) 
    smControl.MyID = e.Item.Value 'Here I am passing value which is from Database 
    radPnlItem.Controls.Add(smControl) 
    e.Item.Items.Add(radPnlItem) 
    End Sub 

  5. Sunny
    Sunny avatar
    31 posts
    Member since:
    Aug 2009

    Posted 29 Oct 2009 Link to this post

    I am implementing PanelBar Load on demand code (which in the link - firstpost). I am loading user control only when panelitem is selected.

    Question: When the user goes back to the panelitem which he/she has already expanded few min. ago.. How to avoid executing (calling db or loadcontrol call) code again?
Back to Top