radgridcolumn chooser

1 Answer 27 Views
GridView
atfat
Top achievements
Rank 1
Iron
atfat asked on 21 Jun 2021, 11:25 AM | edited on 21 Jun 2021, 11:26 AM

hi,

i use a radgridcolumn chooser related to a radgrid with 2019 radtheme

is there any way to change the font used programatically

thx a lot...

atfat
Top achievements
Rank 1
Iron
commented on 22 Jun 2021, 10:35 AM

thank you very much Dess...

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Jun 2021, 05:01 AM

Hi, Aftat,

If you need to change the font for the column chooser, you should handle the ColumnChooserItemElementCreating and ColumnChooserCreated events and apply the desired font as follows:

        Font f = new Font("Arial", 12f, FontStyle.Italic);

        public RadForm1()
        {
            InitializeComponent();

            this.radGridView1.ColumnChooserItemElementCreating += radGridView1_ColumnChooserItemElementCreating;
            this.radGridView1.ColumnChooserCreated += radGridView1_ColumnChooserCreated;
        }

        private void radGridView1_ColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
        {
            e.ColumnChooser.Font = f;
        }
        
        private void radGridView1_ColumnChooserItemElementCreating(object sender, ColumnChooserItemElementCreatingEventArgs e)
        {
            e.ItemElement.Font = f;
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
GridView
Asked by
atfat
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or