Consistent style between

9 posts, 0 answers
  1. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 27 Mar 2009 Link to this post

    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?

     

  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 27 Mar 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 31 Mar 2009 Link to this post

    Hi:

    I have purchased and I am using 2008.3.1314.35.

    Phil
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 31 Mar 2009 Link to this post

    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.
  6. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 31 Mar 2009 Link to this post

    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.
  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 31 Mar 2009 Link to this post

    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.
  8. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 31 Mar 2009 Link to this post

    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.
  9. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 31 Mar 2009 Link to this post

    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
  10. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 07 Apr 2009 Link to this post

    Thanks, Firefox is a great suggestion.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017