Skip to content
Michael Scheffler
Michael Scheffler asked on May 19, 2020 4:34 PM

Hi all,

I have a grid that already contains data and headers and is styled via an isl file. I now want to change the font and font size of the whole grid (Everything incl. Cells, Headers etc.) at once.

I’ve already set ResolutionOrder to ControlThenApplication for the grid and then tried to set:

grid.Font = new Font(name, size, FontStyle.Regular);

grid.DisplayLayout.Appearance.FontData.Name = name;
grid.DisplayLayout.Appearance.FontData.SizeInPoints = size;

with no luck. Nothing changed!

Any ideas? Thanks for your help!

Regards,

Michael

Sign In to post a reply

Replies

  • 0
    Mike Bowshewicz
    Mike Bowshewicz answered on Apr 5, 2017 8:33 PM

    Hi Michael,

    Depending on the settings on the ISL, this may or may not be expected. For example: if a style is applied specifically to rows or cells, this would take precedence over a grid-level setting. This scope-based precedence applies regardless of the resolution order.

    Please send over your ISL file and I can check it out to determine whether there's anything in it that would override the grid's programmatic appearance. If you would prefer not to share your files on the public forum, please let me know and I will open a private case.

    • 0
      Michael Scheffler
      Michael Scheffler answered on Apr 6, 2017 2:05 PM

      Hi Mike,

      in the meantime I found out that setting the following does work for me. But it is still very strabge!

                  grid.DisplayLayout.Bands.Layout.Override.CellAppearance.FontData.Name = name;
                  grid.DisplayLayout.Bands.Layout.Override.CellAppearance.FontData.SizeInPoints = size;
                  grid.DisplayLayout.Bands.Layout.Override.HeaderAppearance.FontData.Name = name;
                  grid.DisplayLayout.Bands.Layout.Override.HeaderAppearance.FontData.SizeInPoints = size;
                  grid.DisplayLayout.Bands.Layout.Override.RowSelectorAppearance.FontData.Name = name;
                  grid.DisplayLayout.Bands.Layout.Override.RowSelectorAppearance.FontData.SizeInPoints = size;

      I'm not allowed to post the isl file. Maybe I can setup a sample project to demonstrate the issue.

      Regards

      Michael

      • 0
        Mike Bowshewicz
        Mike Bowshewicz answered on Apr 6, 2017 2:43 PM

        Hi Michael,

        Actually, the behavior makes a lot of sense! In the first post, appearances are set at the grid level. This is one of the lower priority levels (the only lower being application level) and it's overwritten by any row or cell level settings in the ISL. In the second post, they're set at the row and cell level. This takes precedence over any row/cell ISL settings so you can see the effect in the application.

        Please let me know if you have any further questions.

  • 0
    Lazarus Leo
    Lazarus Leo answered on May 19, 2020 4:34 PM

    Adding font-size property to your attached html does in fact change the font size by using Wingdings font converter. Try inspecting the numbers in Chrome devtools.

    <div class="container" style="float: left; font-family: 'Germania One', cursive;">
            <div class="row">
              <div class="col">
                <img src="forca.png" alt=""> 
                <p style="font-size:2em">2</p>
              </div>
              <div class="col">
                <img src="destreza.png" alt=""> 
                <p style="font-size:2em">3</p>
              </div>
              <div class="col">
                <img src="agilidade.png" alt=""> 
                <p style="font-size:2em">2</p>
              </div>
              <div class="col">
                 <img src="inteligencia.png" alt=""> 
                <p style="font-size:2em">8</p>
              </div>
              <div class="col">
                <img src="resistencia.png" alt=""> 
                <p style="font-size:2em">4</p>
              </div>
              <div class="col">
                <img src="fe.png" alt=""> 
                <p style="font-size:2em">2</p>
              </div>
              <div class="col">
                <img src="carisma.png" alt=""> 
                <p style="font-size:2em">4</p>
              </div>
            </div>
          </div>

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Michael Scheffler
Favorites
0
Replies
3
Created On
May 19, 2020
Last Post
6 years, 4 months ago

Suggested Discussions

Created by

Created on

May 19, 2020 4:34 PM

Last activity on

Feb 20, 2026 12:01 PM