Hi,
Is there any event I can catch when UltraGridColumn.Hidden is changed?
The AfterColPosChanged doesn't fired.
Regards,Jason
How is the column Hidden property getting set? The user can't hide a column unless you are using the ColumnChooser, in which case the AfterColPosChanged event should fire. If it's not firing, something is wrong.
If you are setting the Hidden property in code, then the event might not fire, but since your code is setting the property, you really don't need an event to tell you that this happened.
Way does the event not fire when the Hidden property is set in code??? Does not make sense to me and it makes me suspect that the event is not well encapsulated. I want to catch the event no matter how the column was hidden/shown. The way it is now, I have to observe both the event and my code.
Hey, thanks for the quick response. You're right as long as the changes in visibility matters to the component that manipulates them. I have a situation where component A (a custom column chooser) manipulates column visibility and component B listens to AfterColPosChanged. A and B don't (and should not) "know" each other. I'll see what I can do with your suggestion.
The idea is, you know when you set the value programmatically so you don't need to be informed when it changes that way. If you want to react to a change in the value of that property, you can handle the PropertyChanged event, and filter for the case where the property ID is equal to Infragistics.Win.UltraWinGrid.PropertyIds.Hidden, and the source is an UltraGridColumn.