JA
James
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()