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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing font at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

37776 Nov 30,2005 08:57 AM UTC Nov 30,2005 09:18 AM UTC Windows Forms 1
loading
Tags: GridControl
Jat
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));

CONFIRMATION

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.

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

;