RadPanelBar no longer uses Skin when Rebind is called during a RadGrid's PreRender

4 posts, 0 answers
  1. William
    William avatar
    4 posts
    Member since:
    Jan 2013

    Posted 07 Mar 2013 Link to this post

    I have a form with a RadGrid set to use the Outlook skin and a RadPanelBar also set to use the Outlook skin.  This has been working without issue until I followed the code example on how to force all rows in a RadGrid into edit mode.  When this happens, the RadGrid.Rebind() causes the RadPanelBar to loose styling.  I have isolated it to just the Rebind() on the RadGrid's PreRender.

    Private Sub rgScripts_PreRender(sender As Object, e As EventArgs) Handles rgScripts.PreRender
        If Not IsPostBack Then
            For Each item As GridItem In rgScripts.MasterTableView.Items
                If TypeOf item Is GridEditableItem Then
                    Dim editableItem As GridEditableItem = CType(item, GridDataItem)
                    editableItem.Edit = True
                End If
            Next
            rgScripts.Rebind()
        End If
    End Sub

    My RadGrid and RadPanelBar are defined as followed:

    <telerik:RadGrid ID="rgScripts" runat="server" Skin="Outlook" AllowMultiRowEdit="true">
    ...
    </telerik:RadGrid>
     
    <telerik:RadPanelBar ID="pbAddNewDrug" runat="server" Width="100%" Skin="Outlook" EnableEmbeddedSkins="true">
    ...
    </telerik:RadPanelBar>

    This works perfectly if rgScripts.Rebind() isn't called.

    Thanks,
    William
  2. William
    William avatar
    4 posts
    Member since:
    Jan 2013

    Posted 07 Mar 2013 Link to this post

    .
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 12 Mar 2013 Link to this post

    Hello William,

    Since I am not able to reproduce the described issue, I have attached sample project that implements very similar scenario. Please could you try to clarify what exactly is different in your project in order to replicate that behavior at my side.


    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. William
    William avatar
    4 posts
    Member since:
    Jan 2013

    Posted 12 Mar 2013 Link to this post

    I was actually able to resolve the issue by setting the Skin property in the asp.net .skin file for all Rad Controls rather than setting it in the aspx page for every control.  The RadGrid and RadPanelBar each contained about 100 or so other nested Rad Controls and I noticed that things started working correctly when I removed some of the skin property from some of those nested controls being repeating row after row in the RadGrid.  Not sure if this was just a generic CSS type issue (too many nested controls perhaps?), but wanted to reply with the solution that worked for me, and to thank you for the response. 

    Thanks,
    William
Back to Top