Add/Remove child with data bound grid and sortable list

Add/Remove child with data bound grid and sortable list

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


sgraham posted on Tuesday, October 14, 2008

I have a parent -> child object model on a form and the children are bound to a sortable binding list which is bound to a data grid (in a windows form).  I have provided functionality to add and remove more than one (sometimes 500 or more) child at one time.  However, I've notice that performance is EXTREMELY slow in doing so...especially removing.  After inspection, I've noticed that the binding list appears to be resorting after EVERY child add/remove.  Is there a best practice I should be implementing for sortable binding lists to avoid this?  Further, are there other best practices I should be using to avoid unneccsary processing in the data grid until the function is complete?  Also, would I lose any functionality when implementing such practicecs?  Any help would be greatly appreciated!

Copyright (c) Marimer LLC