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

Skin problem when loading with ajax

7 Answers 143 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
BiBongNet
Top achievements
Rank 2
BiBongNet asked on 11 May 2010, 05:53 AM
Hi,

I am using RadControl 2010 Q1, .net 3.5.

My scenario is as follows:

I use a RadPanelBar as the navigator and dynamically load user control accordingly to its item value.
In the user control, I have a GridView to manage the list of items, and a DetailView for reading the detail of item and for editing, inserting. This DetailView load the item when I click the item in the GridView. Everything works fine without ajax.

When I use ajax to load user control, and ajax to load the item detail to the DetailView by clicking the item in the GridView, All skin of  controls in the DetailView fails to load correctly, in all ReadOnly, Edit and Insert modes. I use SkinID defined in the .skin file for all rad controls. This only happens with IE, but works perfectly with FireFox.

Even when I try to load user control without ajax, and only use ajax to load the item from GridView to the DetailView, the problem still exists. This proves that no problem is related to dynamic load of user control, right? I think the problem is at when the DetailView loads all controls inside it, but fails to load skin.

Please give some advice.
Thanks in advance.

7 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 May 2010, 02:19 PM
Hi BiBongNet,

Internet Explorer is unable to handle more than 31 CSS files and <style> tags. If you have more than that, please combine them to reduce their number.

If the problem seems to be caused by something else, please provide a runnable demo. Thank you.

Regards,
Dimo
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.
0
BiBongNet
Top achievements
Rank 2
answered on 11 May 2010, 02:28 PM
Hi Dimo,

Thank you for your reply.

Internet Explorer is unable to handle more than 31 CSS files and <style> tags. Yes, I do know this, and in fact, I have only nearly 20 css files.
And the important thing is that I do not use custom skin and custom css file, but use the built-in skin of Rad controls with EnableEmbeddedSkins="true". And everythings works perfectly with normal postback, only with ajax this problem occurs.

Thanks.
0
Dimo
Telerik team
answered on 11 May 2010, 02:35 PM
Hi BiBongNet,

Are you using RadAjaxManager / RadAjaxPanel for AJAX requests, or regular UpdatePanels? Regular UpdatePanels cannot register CSS files during AJAX requests.

For RadAjaxManager / RadAjaxPanel you may need to set EnableAjaxSkinRendering="true" for the affected controls. This must be done programmatically in Page_Load.


Dimo
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.
0
BiBongNet
Top achievements
Rank 2
answered on 12 May 2010, 10:12 AM
Hi Dimo,

Thanks for your reply.

Please let me clarify my scenario:

I have an admin page, called Admin.aspx, which use masterpage. I put RadAjaxManager in the MasterPage.

In the Admin.aspx, I have a RadPanelBar as the navigation. When clicking an item of this panelbar, the page will load a user control (let's call Myadmin.ascx) into the normal asp Panel (I have also tried both normal asp panel and asp PlaceHolder) just beside the panelbar. I use RadAjaxManager Proxy to do this (I have also tried RadUpdatePanel).

In the Myadmin.ascx, I have a gridview with the list of items to manage, and a detailview which load the item detail when clicking the item in the gridview. The detailview is for editing, inserting...

The user control Myadmin.ascx is loaded  fine, and all the rad controls inside the gridview is ok.
When clicking an item in the gridview to load into the detailview, everything and all rad controls is loaded perfectly when the detailview is in ReadOnly mode (just viewing the detail of the item). But when I click the edit button to edit the item, all the rad controls fail to load skin in this Edit mode. This also happens in case of Insert mode.

Please note that this problem is only with IE, but no problem with FireFox, Seamonkey....

So, your suggestion "set EnableAjaxSkinRendering="true" for the affected controls. This must be done programmatically in Page_Load..." cannot apply in this case. I have also tried to set EnableAjaxSkinRendering="true" in the DataBound event of the detailview, for each mode of edit, insert..., but with no luck.

I have also tried to use skinID for rad controls, or direct declaration  of all properties for them, but with no success.

I have also tried to load the user control without Ajax, and only use ajax to load the item detail from the gridview into the detailview, but the same problem exists.

I don't think the problem is how to set EnableAjaxSkinRendering="true" nor something wrong in programming logic. Because all work well with FireFox, but fail with IE.

Any idea?

Thank you.
0
Dimo
Telerik team
answered on 12 May 2010, 11:18 AM
Hi BiBongNet,

You say that you have 20 CSS files, but does this number include the base stylesheets? Have you tried using RadStyleSheetManager, which can combine embedded CSS files to reduce their number?

Once again, I suggest you to send a runnable project, so that we can inspect it locally.

Kind regards,
Dimo
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.
0
BiBongNet
Top achievements
Rank 2
answered on 12 May 2010, 03:01 PM
Hi Dimo,

Thank you very much for your quick reply.

Following your suggestion, I double check the css files, and now everything is ok.

Actually I have 24 css files in total, 23 of Rad controls and 1 common css file for my site. This make me believe that I can never exceed the number 31, right? But when I try to reduce the number of css file (by manually merge some of them into one file). And now it is ok.

I wonder why my 24 would exceed 31??? perhaps IE bugs?

Thank you very much.
0
Dimo
Telerik team
answered on 12 May 2010, 03:09 PM
RadControls also register base stylesheets and you probably don't take them into account.

http://www.telerik.com/help/aspnet-ajax/howskinswork.html

Regards,
Dimo
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.
Tags
Ajax
Asked by
BiBongNet
Top achievements
Rank 2
Answers by
Dimo
Telerik team
BiBongNet
Top achievements
Rank 2
Share this question
or