We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing font at runtime

Thread ID:





37776 Nov 30,2005 08:57 AM UTC Nov 30,2005 09:18 AM UTC WinForms 1
Tags: GridControl
Asked On November 30, 2005 08:57 AM UTC

Hi I am trying to change the font of the grid cells, using the following code: gridMain.Appearance.AnyRecordFieldCell.Font = new GridFontInfo( font ); Where font is a System.Windows.Drawing.Font object. For some reason I can only change the font once. If I try to do it a 2nd time. The grid crashes. Any ideas?

Administrator [Syncfusion]
Replied On November 30, 2005 09:18 AM UTC

Before setting the font, try calling style.ResetFont to see if this makes things work all the time. this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.ResetFont(); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Font = new GridFontInfo(new Font("Courier New", 10));


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon