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

Consistent style between

8 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 2
Phil asked on 27 Mar 2009, 06:33 PM

Hi:
I am using Office2007 skin.  I have noticed that with GridBoundColumn and GridTemplateColumn that the cell display in different font sizes.  This is true in both ItemTemplate and EditItemTemplate modes.  How do I maintain a consistent style?

 

8 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 27 Mar 2009, 08:15 PM
Hi Phil-

Are you using the Q1 2009 RadControls? We made a huge effort in Q1 to make all styles consistent and "pixel perfect," so you should not be observing inconsistent styles in the GridBoundColumn and TemplateColumn. For an example, check out this demo (that has a template column):


You can change the skin applied to this demo using the Skin Chooser on the page (upper right) to apply the Office 2007 skin. You should observe the font sizes are consistent. If this is not what you're seeing in your own application, I expect there may be some other styles in your site that are overriding the Grid's styles. And in that case FireBug for FireFox is your CSS debugging friend. It will help you see which styles are being applied to an element on your page.

Hope that helps!
-Todd
0
Phil
Top achievements
Rank 2
answered on 31 Mar 2009, 02:49 PM
Hi:

I have purchased and I am using 2008.3.1314.35.

Phil
0
Dimo
Telerik team
answered on 31 Mar 2009, 02:54 PM
Hi Phil,

The reason for the different font size in the two column types is:

1) You are running the web page in quirks mode (no DOCTYPE or HTML 4.0 DOCTYPE). In this mode tables do not inherit font styles. I suppose you have a <table> inside the ItemTemplate.

OR

2) You have some font-styles defined for table cells (<td>) or some other elements, which you are using inside the ItemTemplate. In this case your styles override the RadGrid font styles, which are defined for table elements only.

Let us know if you need more information.

Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Phil
Top achievements
Rank 2
answered on 31 Mar 2009, 03:23 PM
Hi:

When I view source the Label controls have style="font-size:10pt;", yet css class GridRow_Office2007 is displaying in 8pt.  I force a style of Style="font-size:8pt;" in the Label control and it is displaying 8pt, but the view source the Label controls have style="font-size:10pt;font-size:8pt;"  Ugly.
0
Dimo
Telerik team
answered on 31 Mar 2009, 04:42 PM
Hello Phil,

Well, obviously those font-size styles don't come from RadGrid, so please consider optimizing the custom CSS code.

Regards,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Phil
Top achievements
Rank 2
answered on 01 Apr 2009, 12:04 AM
Hi
I do not appreciate 'obviously'. 
I had already look in the app_theme default.css for any td styles.  I inherited my app_themes directory, but I did find the culprit.  It was a skin on the textbox and label control.
0
Todd Anglin
Top achievements
Rank 2
answered on 01 Apr 2009, 12:10 AM
Hello Phil-

I'm sure it was just a poor choice of words. I know Dimo's goal is to help you find your solution as quickly as possible.

In any event, it appears you've found the solution to your problem. I think what Dimo meant to communicate is that the RadGrid does not impose any special font styles (such as those you posted earlier), so the problem had to exist in some other custom styles in your app. Hopefully that helped guide you to your custom skin file and your solution.

In the future, you may be able to more quickly debug these weird CSS issues using FireFox and FireBug. That tool makes it very easy to see where styles applied to a specific control are coming from. If they're in-line styles (as they were in this case) or styles not coming from a Telerik CSS class name, you know to focus your debugging in your custom code. I use the tool all the time and it makes life a lot easier!

If you have any trouble in the future, you know where to find help. 'Til then, enjoy the RadControls!

-Todd
0
Phil
Top achievements
Rank 2
answered on 07 Apr 2009, 07:38 PM
Thanks, Firefox is a great suggestion.
Tags
Grid
Asked by
Phil
Top achievements
Rank 2
Answers by
Todd Anglin
Top achievements
Rank 2
Phil
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or