Home > Net >  Font change in RadGridView
Font change in RadGridView

Time:11-25

I have created a Telerik Windows Form Application Project, and Then I added a RadGridView.

enter image description here

But it seems font changing does not affect columns and rows and so many others. I should change the theme to ControlDefault to get the font affect.

enter image description here

enter image description here

This problem is also appearing on RadButtons. Where is the problem?

CodePudding user response:

Please have in mind that for some controls (like RadLabel), it is enough to set the Font property, while for others (like RadGridView), you will need to introduce this setting in a formatting event, e.g. the CellFormatting/ViewCellFormatting events that RadGridView offers:

        Font f = new Font("Arial", 10, System.Drawing.FontStyle.Regular);
    private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        e.CellElement.Font = f;
    }

I would recommend you to have a look at the following KB article: https://docs.telerik.com/devtools/winforms/knowledge-base/change-the-font

  • Related