Changing Default Values in a controls control collection

Denaes

Senior Contributor
Joined
Jun 10, 2003
Messages
956
Imagine a grid control. It has a collection of columns. But no events to say when the columns are added.

By default, each column created is set to Visible (and a few other things) and We need the default set to invisible (Visible = False) or really almost anything.

We have a custom version of this Infragistics Grid control and would like our version to default columns to not visible

My thought was to catch an event of the column being added and set the appropriate properties then, but there seems to be no events for this. I could also go into the source code and just throw in an Event or change the default there, but as Infragistics gives us updates/fixes, I'd have to deal with merging the two sets of sourcecode.
 
What about inheriting the control and overriding just the one method in question to get the new default value. That should give you enough insulation to handle the upgrades while giving you the flexibility to change what you need to change.
 
I already have things set up as an inherited control, so thats really not much trouble.

Sounds like it might be the best plan... if I can narrow down the methods that are adding the columns. Might be easy/obvious.
 
Back
Top