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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl Custom Fonts VB.Net

Thread ID:

Created:

Updated:

Platform:

Replies:

72895 Apr 10,2008 11:47 AM UTC Apr 10,2008 12:25 PM UTC WinForms 1
loading
Tags: GridControl
James
Asked On April 10, 2008 11:47 AM UTC

I have a program that has multiple screens with multiple functions. Each with either a GridControl, or a GridDataBoundControl. I am trying to give the user the capability to go into a Custom Color/Font screen, and save a custom setting for their grids. Setting the backcolor for a row was simple enough, however, changing the font has been tricky. When the grid displays on the form, it is set to whatever the saved setting is. Then they click on a button next to the row they want to modify, and it brings up a fontdialog. After selecting and clicking ok, it changes the grid. But, if they do not like it, and go through the same step, no matter what, it doesn't change. What is wrong? Below is a snippet.

'***fd1 is the FontDialog

Dim gfI As New GridFontInfo(fd1.Font)
Dim style As New GridStyleInfo
style.Font = gfI
Me.dgInventory.TableStyle.ModifyStyle(style.Store, Syncfusion.Styles.StyleModifyType.ApplyNew)
Me.dgInventory.Update()
Me.dgInventory.Refresh()



James
Replied On April 10, 2008 12:25 PM UTC

I don't know if this is the best way to do it.... but I got it done by changing the following line....

Me.dgInventory.TableStyle.ModifyStyle(style.Store, Syncfusion.Styles.StyleModifyType.Override)

Instead of ApplyNew.... Override.


>I have a program that has multiple screens with multiple functions. Each with either a GridControl, or a GridDataBoundControl. I am trying to give the user the capability to go into a Custom Color/Font screen, and save a custom setting for their grids. Setting the backcolor for a row was simple enough, however, changing the font has been tricky. When the grid displays on the form, it is set to whatever the saved setting is. Then they click on a button next to the row they want to modify, and it brings up a fontdialog. After selecting and clicking ok, it changes the grid. But, if they do not like it, and go through the same step, no matter what, it doesn't change. What is wrong? Below is a snippet.

'***fd1 is the FontDialog

Dim gfI As New GridFontInfo(fd1.Font)
Dim style As New GridStyleInfo
style.Font = gfI
Me.dgInventory.TableStyle.ModifyStyle(style.Store, Syncfusion.Styles.StyleModifyType.ApplyNew)
Me.dgInventory.Update()
Me.dgInventory.Refresh()





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

;