LinqBindingList with CslaActionExtender
LinqBindingList with CslaActionExtenderOld forum URL: forums.lhotka.net/forums/t/8369.aspx
tstout posted on Friday, January 15, 2010I have a root list bound to a data grid that I need to filter based on changes to a combo box. I am using CslaActionExtender to manage all the uglies associated with databinding rules. I cannot get a LinqBindingList to work with CslaActionExtender.ResetActionBehaviors() since it expects an ISavable and LinqBindingList does not implement ISavable. I assume that when I filter the list, I need to call ResetActionBehaviours() to trigger a databinding update with the filtered list. Is there some other way to accomplish this? Is CslaActionExtender simply not designed to work with LinqBindingList?
RockfordLhotka replied on Friday, January 15, 2010
LinqBindingList is a view over a real list. It is just a view, so it is not savable. Only the actual list is savable, and then only if it is an editable root list.
I would say that CslaActionExtender was designed independently from LinqBindingList. LinqBindingList was created primarily to support newer UI technologies, and CslaActionExtender was designed to help simplify the code required to write legacy Windows Forms code.
But regardless of the UI technology, LinqBindingList is simply a view over the real list, so it is never savable. Only the real list can be saved.
Copyright (c) Marimer LLC