This is not a question, cause I already answerd it. But it may be helpful to others, too.
这是发生的情况:
- Create a WinForm with a Datagridview and bind a Subsonic ...Collection with more then 500 objects loaded to it
- Add some columns to the datagrid and make at least one autosizemode = fill
- Add logic to delete all selected columns (i.e. on keypress -> delete)
- Mark all records and delete them
This should take about 30 sec. on a high end pc (and scales up: 1 min for 1000 ...)
Cause:
Everytime you delete a row the collections ListChanged event is fired which causes the datagridview to recalculate the space needed for the autosized column (if someone is interested in the "internals" I attached a call graph.