Css info lost on async postback

Answered (Verified) This post has 1 verified answer | 4 Replies | 1 Follower Thread's RSS feed.

dvanzo
Points 350
Replied On: Fri, Oct 23 2009 4:32 PM Reply

Recentrly I upgraded from v6.3 to v8.2

Until now, I was working fine, but since the migration something strange is happening:

I have many different controls in a masterpage and a webpage in it. Most of the controls have css classes defined. When the page is loaded, styles are applyed correctly, yet when an async postback is executed, all styles are lost.

Can someone help me?

  • Post Points: 20

Verified Answer

Answered (Verified) Replied On: Tue, Oct 27 2009 10:30 AM Reply
Verified by dvanzo

dvanzo:
class = " ig_d4377750_r2 menuItem"
The class "ig_d4377750_r2" is a CSS class that was automatically generated by one of our controls (WebMenu, in this case).  This is precisely the scenario that I discussed in my previous update.  The ID, "ig_d4377750" in this case, changes from callback to callback, but the dynamically-rendered CSS (in the HEAD of the page) cannot be updated during an asynchronous callback.

To address this, you need to explicitly define a CSS class for all of the relevant Style properties used on our controls, and make sure that this CSS is included in your page during the initial callback.  Alternately, you can use Application Styling, which will handle creating and connecting the CSS for you.

Vince McDonald
Senior Developer Support Engineer, MCP

Need help? Find the various ways you can ask for help from Infragistics.

  • Post Points: 40

All Replies

Replied On: Mon, Oct 26 2009 11:43 AM Reply

I believe the following post contains the answer to this issue, as well as an explanation of why it occurs:
http://forums.infragistics.com/forums/p/29454/130832.aspx#130832

Vince McDonald
Senior Developer Support Engineer, MCP

Need help? Find the various ways you can ask for help from Infragistics.

  • Post Points: 20
dvanzo
Points 350
Replied On: Tue, Oct 27 2009 9:49 AM Reply

I'm sorry, but that post does not apply to our problem (although it's interesting). We are already using css classes, but our problem is that as soon as an async postback is made, all those css settings are lost.

Here's an example:

I have an Infragistics UltraWebMenu in a Master Page, I want the items to have a certain style. I use a class for this, called "menuItem", asigned in ItemStyle in the markup part of the master page.

when the page renders, it does like this:

 

class

 

= " ig_d4377750_r2 menuItem"

and it shows exactly what I want. But then, when the user clicks in a toolbar option, a datagrid gets filled, and the styles I defined are ignored and only the ones defined in ig_d4377750_r2 are used.

This started to happen only when we migrated from v6.3 to v8.2

 

  • Post Points: 20
Answered (Verified) Replied On: Tue, Oct 27 2009 10:30 AM Reply
Verified by dvanzo

dvanzo:
class = " ig_d4377750_r2 menuItem"
The class "ig_d4377750_r2" is a CSS class that was automatically generated by one of our controls (WebMenu, in this case).  This is precisely the scenario that I discussed in my previous update.  The ID, "ig_d4377750" in this case, changes from callback to callback, but the dynamically-rendered CSS (in the HEAD of the page) cannot be updated during an asynchronous callback.

To address this, you need to explicitly define a CSS class for all of the relevant Style properties used on our controls, and make sure that this CSS is included in your page during the initial callback.  Alternately, you can use Application Styling, which will handle creating and connecting the CSS for you.

Vince McDonald
Senior Developer Support Engineer, MCP

Need help? Find the various ways you can ask for help from Infragistics.

  • Post Points: 40
dvanzo
Points 350
Replied On: Tue, Oct 27 2009 1:05 PM Reply

mmhh... I can see now that you where right.. the problem was actually in our css files, that in v6.3 were being ignored and now in v8.2 are taken into account, and they were different to what we thought!

Thanks for your time!

 

  • Post Points: 5
Page 1 of 1 (5 items) | RSS