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

RadAjaxPanel and Skin problem

6 Answers 109 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Magnus
Top achievements
Rank 1
Magnus asked on 19 Aug 2009, 08:02 PM

I have a UserControl with RadAjaxPanel, two asp:panels and some RadControls like RadTextBox, RadComboBox etc. and two buttons (back and continue). I use a skinfile.skin to set all the RadControls to Vista-skin. When I first get to the aspx page panel 1 is shown (visible=true) and panel 2 is hidden (visible=false). Vista skin works and everything looks fine, but when I click on the continue button which hides panel 1 and shows panel 2 the Vista skin stops working. All the RadControls look strange. If I click on the back button and then on the continue button again the Vista look starts and everything looks as it should. Without the RadAjaxPanel this works fine.

What is the problem and how can I get it to work?

The principle code looks like this: 

/***** UserControl (Without a lot of tags/attributes) ******/
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
<asp:Panel ID="pnl1" runat="server" CssClass="candidatePersonalInfoPanel">                                               
 <telerik:RadTextBox ID="txt1" runat="server" />                                                                                                                                                                                                                                                   
 
<telerik:RadComboBox ID="ddl1" runat="server" />                                                                                                                                                                                                                                   
</asp:Panel>
<asp:Panel ID="pnl2" runat="server" Visible="false">
 <telerik:RadTextBox ID="txt2" runat="server" />                                                                                                                                                                                                                                                   
 <telerik:RadComboBox ID="ddl2" runat="server" />          
</asp:Panel>
<asp:Button ID="btnBack" CausesValidation="false" runat="server" Text="« Back" />
<asp:Button ID="btnContinue" CausesValidation="true" runat="server" Text="Continue »" />                                                               
</telerik:RadAjaxPanel>

 

/***** SkinFile.skin ******/
<telerik:RadComboBox runat="server"
    Skin="Vista">
</telerik:RadComboBox>

<telerik:RadTextBox runat="server"
    Skin="Vista"       
    InvalidStyleDuration="100">   
</telerik:RadTextBox> 

6 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Aug 2009, 08:19 AM
Hello Magnus,

I could not reproduce the described problem, based on the provided code snippets, however, such issues may occur when a RadControl is made visible after an AJAX request. The problem is caused by the fact that the control does not register its skin after the AJAX request. A possible solution is to set EnableAjaxSkinRendering = true for the problematic controls. This must be done in Page_Load().

An alternative solution is to register the control's skin unconditionally with RadStyleSheetManager, however this is not a suitable approach when using themes.

If the problem persists, please send us a runnable project for us to inspect locally. Thanks.

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Magnus
Top achievements
Rank 1
answered on 20 Aug 2009, 08:43 PM

Thanks for your reply. Unfortunately, this does not seem to help.

I have two pictures that show the problem and I have done a web project that produces the described problem. I send those files to you in an email and hope you can find a solution to the problem.

Thanks,
Magnus

0
Dimo
Telerik team
answered on 21 Aug 2009, 12:08 PM
Hello Magnus,

The problem is caused by CSS styles in the controls' skins, which are applied incorrectly. The problem will not occur in the next official version, to be released in late August.

You can add the following CSS rules as a workaround:

        .riTextBox
        {
            height:auto !important;       
        }
        .RadComboBox_Vista table td.rcbInputCell
        {
            height: 20px !important;
            line-height: 20px !important;
        }


Last but not least, please note that normally we do not provide support service via email - please use support tickets for that. Thank you for understanding.


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Magnus
Top achievements
Rank 1
answered on 21 Aug 2009, 12:32 PM

Hello again and thank you,

This workaround solves the RadTextBox problem, unfortunately the problem persist on the RadComboBox.

Many thanks
Magnus

0
Dimo
Telerik team
answered on 21 Aug 2009, 12:43 PM
Hi Magnus,

Sorry, one more style is required:


        .riTextBox ,
        .rcbInput

        {
            height:auto !important;      
        }


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Magnus
Top achievements
Rank 1
answered on 21 Aug 2009, 03:08 PM
Yes and thanks again.

Magnus
Tags
Ajax
Asked by
Magnus
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Magnus
Top achievements
Rank 1
Share this question
or