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
160
Duplicate event handler registration
posted

Hello,

Just seen in your code in ColumnsCollection (v. 2010.3)

public UltraGridColumn Insert(int index, string key)
    {
      base.ValidateKeyDoesNotExist(key);
      UltraGridColumn column = null;
      if (key == null)
      {
        column = new UltraGridColumn(this.band);
      }
      else
      {
        column = new UltraGridColumn(this.band, key);
      }
      column.SubObjectPropChanged += base.SubObjectPropChangeHandler;
      this.InternalInsert(index, column);
      return column;
    }
    
    internal void InternalInsert(int index, UltraGridColumn column)
    {
      base.InternalInsert(index, column);
      this.BumpColumnsVersion();
      column.SubObjectPropChanged += base.SubObjectPropChangeHandler;
      base.NotifyPropChange(PropertyIds.Add);
      this.AddRemoveColumnFromCalcManager(column, true);
    }

In Insert you have column.SubObjectPropChanged += base.SubObjectPropChangeHandler;
then at the next row you call  InternalInsert which inside does same registration second time.

Regards,
Maxim Golubitsky 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Maxim,

    That looks like a bug, all right. I have forwarded this thread over to Infragistics Developer Support so they can write it up for developer review.

     

Children