Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
What event will be triggered when UltraWinGrid column changed?
posted

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,

Parents
No Data
Reply
  • 37774
    posted

    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

Children