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.

Getting Changes in a GridStyleInfo

Thread ID:

Created:

Updated:

Platform:

Replies:

43903 May 8,2006 03:12 AM May 8,2006 08:34 AM Windows Forms 1
loading
Tags: GridControl
Terence Rossow
Asked On May 8, 2006 03:12 AM

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

Administrator [Syncfusion]
Replied On May 8, 2006 08:34 AM

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.

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.

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.

;