User Re-ordering of Child Collection

User Re-ordering of Child Collection

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


SomeGuy posted on Monday, December 01, 2008

What's the best way to allow users to re-order a child collection?

In the past I put a private _isMoving flag on the collection and added MoveUp/MoveDown methods that removed and re-inserted the items, the flag told the collection to not really delete and re-add a new object. I had an Order column on the table, and passed a value to each child object as it interated through the list.

Is there a way to use a SortedBindingList to allow the users to re-order the list, and then use that order when updating the child objects? Thanks.

 

Copyright (c) Marimer LLC