This is a migrated thread and some comments may be shown as answers.

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

3 Answers 96 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 07 Mar 2013, 09:11 PM
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

3 Answers, 1 is accepted

Sort by
0
William
Top achievements
Rank 1
answered on 07 Mar 2013, 09:39 PM
.
0
Boyan Dimitrov
Telerik team
answered on 12 Mar 2013, 03:48 PM
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.
0
William
Top achievements
Rank 1
answered on 12 Mar 2013, 04:37 PM
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
Tags
PanelBar
Asked by
William
Top achievements
Rank 1
Answers by
William
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or