Hi,
May I know is there any event will be trigged when I changed the UltraWinGrid's column properties Programmatically during run-time? For example during run time, I changed the MaxValue for a Column.
Is there a specific event for this or I should use PropertyChanged? If using PropertyChanged, which PropertyIds should I check against?
Thank you very much.
Best Regards,
The PropertyChanged event is the correct place to look for when the MaxValue property is changed on the column. You'll need to walk up the Trigger chain looking for the MaxValue property ID, such as:
private void ultraGrid1_PropertyChanged(object sender, Infragistics.Win.PropertyChangedEventArgs e){ PropChangeInfo info = e.ChangeInfo.Trigger; while (info != null) { if ((PropertyIds)info.PropId == PropertyIds.MaxValue) { // Do Stuff return; } else info = info.Trigger; }}
-Matt
Hi Matt,
Thanks for your reply.
May I know which version of Infragistic are you referring to in your above sample? I am not able to find any PropertyIds.MaxValue, but the nearest I can find is MaxValueExclusive. However, the event is not trigger when I try to change the MaxValue programmatically during run-time, kindly advise. Thanks you very much.
For your information, I am using Infragistic 2008 v2.0.
Thanks again..
It looks like I was using 8.3; in earlier versions it seems that this enum was not updated and thus that the PropertyChanged event isn't firing. This is a bug and should be submitted to Developer Support; unfortunately I don't really have a good workaround for 8.2 other than that you trap for where you are setting this property.
Thanks Matt,
I will try on version 8.3 then. Thanks again.