Cslalight: How to re-enable NotifyCollectionChangedAction.Replace?

Cslalight: How to re-enable NotifyCollectionChangedAction.Replace?

Old forum URL: forums.lhotka.net/forums/t/7495.aspx


Cuong posted on Sunday, August 23, 2009

Hi Rocky,

I am using the Cslalight 's ERL with the Telerik's RadGridView in a SL application. I found that the RadGridView does not update when the ERL's child objects change. I looked into the ERL's source code and I found the reason. You had disabled NotifyCollectionChangedAction.Replace because of a SL Data Grid's bug.

protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
{
      // SL Data Grid's DataGridDataConnection object does not support replace action. 
      // It throws an excpetioon when this occurs.
      if (this.RaiseListChangedEvents && e.Action != NotifyCollectionChangedAction.Replace)
          base.OnCollectionChanged(e);
}

I tried to remove the above checking code and the RadGridView worked properly. That means the RadGridView completely supports the replace action and it needs this action to update its UI. Now I have to change the Cslalight source code to re-enable NotifyCollectionChangedAction.Replace. Could you add an optional member to ERL so I (and other Telerik's users) can use ERL without modifying Cslalight source code?



RockfordLhotka replied on Sunday, August 23, 2009

Added to bug list

http://www.lhotka.net/cslabugs/edit_bug.aspx?id=532

Copyright (c) Marimer LLC