v
Not logged inv
SearchAsk a QuestionReport an IssueMake a SuggestionMy Questions and Issues
Issue Details
Find By ID

ASPxGridView styles got lost after callback

Issue Details

Log in to Track Changes or Edit
Q201136
Bug Report
alex satava
Yes
Processed
By Design
Yes
.NET
ASPxGridView and Editors Suite
8.3.3
Windows XP
Microsoft Visual Studio 2008
4/9/2009 8:07:21 AM
-> Created by alex satava 4/3/2009 8:33:42 AM

Attachment: screen.zip (30096 bytes)

hello

i am using a aspxgridview in a aspxpopupcontrol (which is dynamically set to the page url
using setcontenturl).

problem: when i trigger a "performcallback" on the gridview to update the datarows, then
the styles on the page are applied with different priorities.

as example, when i look at a page titel label (which is not even part of the gridview), the
applied styles look as follows (using IE6 + IEdevelopertoolbar):

/* Rule 5 of /WebResource.axd?d=YqryKbmtmQzEPccv5RS_J4Z8-P-JInJ_Z1HyOwbEKaX1FuD9u_jvnNsmDEKKxA0S7uBPOOJ-EDT4CQQhL-dcEU7W7BmC32Xiqmg3h9Fp8GcZuCHXJW_GaLC8qV9F_IXyOExN6_EPFKrGaT68IQ11Rw2&t=633676180631250000 */
.dxeBase {     FONT-SIZE: 9pt; FONT-FAMILY: Tahoma}
/* Rule 16 of MasterStyles.css */
.xHDRTXT { FONT-WEIGHT: bold; FONT-SIZE: 16px}
/* Rule 2 of ../Styles/PriceCoach.css */
.dxeBase {     FONT-FAMILY: Verdana}

now, before performing the callback, the label appears as verdana 16px bold,
thus using parts of all three style sources (devexpress webresource.axd,
my masterstyles.css and my custom pricecoach.css).
> see attached b4callback.jpg

after the callback, the label appears as tahoma 9pt bold, thus applying the
same styles (e.g. bold is taken from masterstyles.css), but setting a higher
priority on the devexpress webresource.axd, thus overriding my font size and
font family definitions.
> see attached aftercallback.jpg

this happens to all controls on the page, including my custom styling for the
grid template controls...

how can this be resolved?

regards,
alex satava
xss ag

after performing the callback

/* Rule 5 of /WebResource.axd?d=YqryKbmtmQzEPccv5RS_J4Z8-P-JInJ_Z1HyOwbEKaX1FuD9u_jvnNsmDEKKxA0S7uBPOOJ-EDT4CQQhL-dcEU7W7BmC32Xiqmg3h9Fp8GcZuCHXJW_GaLC8qV9F_IXyOExN6_EPFKrGaT68IQ11Rw2&t=633676180631250000 */ .dxeBase {     FONT-SIZE: 9pt;     FONT-FAMILY: Tahoma} /* Rule 16 of MasterStyles.css */ .xHDRTXT {     FONT-WEIGHT: bold;     FONT-SIZE: 16px} /* Rule 2 of ../Styles/PriceCoach.css */ .dxeBase {     FONT-FAMILY: Verdana}

<- Processed (Insufficient Information) by DevExpress Team 4/3/2009 12:11:00 PM

Hi Alex,

Unfortunately, the information you provided doesn't allow me to clearly diagnose this problem.
If possible, post a complete sample project showing the issue. Then, I'll check for a solution.

Thanks,
Alex

-> Reactivated by alex satava 4/3/2009 3:49:54 PM

Attachment: dxIssue.zip (41051 bytes)

hello alex

i have stripped down the page to a sample of the bug.

when you start the project, note the styles of the different controls.
then press the "callback" button, and note how the styles of the controls
change. the only thing the callback button does, is perform a callback on
the gridview. however the styles of all controls seem to be applied in a
different order than on the original page load. a page refresh brings back
the correct styles.

ps. i use three css, one for the page specific sizes of standard controls,
one master for all controls and one for theming of colors and fonts.

thanks for looking into this, i have no clue how to fix this.

regards,
alex satava
xss ag

<- Updated by DevExpress Team 4/6/2009 2:13:17 PM

Hi Alex,

Thanks for posting your files. I see the problem. Apparently, this is an actual ASPxGridView issue.
However, I'm afraid we need some additional time to classify this misbehavior.
I'll update this thread once we have any results. Please accept our sincere apologies for the inconvenience.

Thanks,
Alex

<- Reproduced by DevExpress Team 4/6/2009 2:13:38 PM
<- Processed (By Design) by DevExpress Team 4/7/2009 12:25:24 PM
Hi Alex,

Thanks for your patience. We've come to the conclusion that this behavior is by design.
After a callback, ASPxGridView styles are embedded along with the grid contents, so they override your style sheets
To force applying a particular CSS schema, append "!important" declarations to it.
For reference, check this article: <link href="http://www.w3.org/TR/CSS2/cascade.html#important-rules.com">Assigning property values, Cascading, and Inheritance (see 6.4.2 !important rules)</link.
In addition, I suggest that you create a custom theme rather than modify the default one.
Review the following articles to learn how this can be done:

<link href="http://www.devexpress.com/Products/NET/WebForms/ASPxperience/tutorials/L2_ASPxperience_Custom_CSS/ASPxperience_Custom_CSS.html">Appearance Customization: Using a Custom CSS File</link>;
<link href="http://www.devexpress.com/Products/NET/WebForms/ASPxperience/tutorials/L3_ASPxperience_AutoFormat/ASPxperience_AutoFormat.html">Appearance Customization: Creating and Applying a New AutoFormat</link>;
<link href="http://www.devexpress.com/Products/NET/WebForms/ASPxperience/tutorials/L4_ASPxperience_Themes/ASPxperience_Themes.html">Appearance Customization: Creating and Applying a New Theme</link>.

Thanks,
Alex
-> Reactivated by alex satava 4/8/2009 5:20:41 PM

hello alex

thanks for your information. i understand, that themes might solve the issue.
however our application is not designed to use different themes in regards to
the fonts used. this is something that should be driven by a dynamically added
stylesheet. i wish to explicitly leave the font-family definition customizable.

i don't understand why a css class such as ".dxebase .xHDCCTX" is overridden
by a class ".dxebase" which is delivered by the webresource after callback!

if this is by design, then devexpress aspx components are explicitly not designed
to have fonts and font-sizes configured outside of themes, which is a major
drawback for us and will make us rethink the use of these components in
future applications, and even in the current application in development.

questions:

1) what is the "performance cost" of using themes instead of CSS, both on server-side and client-side?

2) how "safe" is the use of the !important definition in CSS? is this supported by all browsers?

thanks for your feedback...

regards, alex

<- Processed (By Design) by DevExpress Team 4/9/2009 8:07:21 AM

Hi Alex,

Thanks for the response.
Generally, themes (skins) are designed to make the mechanism of modifying an application style easier, and there's some additional server processing performed to apply skin attributes to page controls before rendering them. For reference, check this MSDN article: ASP.NET Themes and Skins Overview.
To learn about CSS support in major web browsers, refer to the web browser standards support document.

Thanks,
Alex

Log in to Track Changes or Edit

Peer-to-Peer Discussion in DevExpress Forums

No discussion on this article has been started yet.

Please login to start discussion.

v
v
Search
Searching Tips