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

Getting Changes in a GridStyleInfo

Thread ID:





43903 May 8,2006 07:12 AM UTC May 8,2006 12:34 PM UTC WinForms 1
Tags: GridControl
Terence Rossow
Asked On May 8, 2006 07:12 AM UTC

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 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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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