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. Image for the cookie policy date

Getting Changes in a GridStyleInfo

Hi there, I am attempting to get the changes made to a GridStyleInfo object (in this case by the controls on a formatting toolbar). What I need to do is detect which property was changed - bold, font name, background colour, etc - and apply that to the existing style. It works to a certain extent using GridStyleInfo.ModifyStyle and passing in StyleModifyType.Changes - however it doesn''t seem to go below the first level of style properties. For example, if I change only font bold, then the entire Font property is copied as a change. Does anyone know of a way to copy only those properties that have changed - down to the level of sub properties? Cheers, TERRY ROSSOW

1 Reply

AD Administrator Syncfusion Team May 8, 2006 12:34 PM UTC

Certainly .NET objects/properties are immutable, meaning that in order to change them, you actually have to create a new object. Objects that have readonly properties are prime candidates for being immutable as they only contain get''s and no set''s. Fonts are such properties. That is why, when you change the boldness on a grid font, a new font object is created. Have you taken a look at the QuickStart\Gridpad sample to see how it handles these tasks? It has a text formatting toolbar that allows you to set boldness, etc. on a font.

Loader.
Live Chat Icon For mobile
Up arrow icon