How do you reapply an existing sorting after the save for a datagridview

How do you reapply an existing sorting after the save for a datagridview

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


GeorgeG posted on Friday, February 09, 2007

I have a root BusinessListBase object. In the Fetch method I have this code

sortedList = new Csla.SortedBindingList<Customer>( customers );
bindingSource.DataSource = sortedList;

In the save method I have
Customers temp = customers.Clone();
customers = temp.Save();
sortedList = new Csla.SortedBindingList<Customer>( customers );
bindingSource.DataSource = sortedList;
but I have already lost any existing sorting?

Any ideas of how to get the existing sorting if any and reapply it after save?

 

Brian Criswell replied on Saturday, February 10, 2007

Call sortedList.ApplySort using the old sortedList's sort values as arguments.

Copyright (c) Marimer LLC