DataGrid: Suspend/ResumeLayout (DataView manipulations)?

  • Thread starter Thread starter alex n
  • Start date Start date
A

alex n

hello.

i manipulate a dataview
(updating and thus filtering a large amount of rows)
and the datagrid bound to the dataview
slows down this process much by adjusting its scroll bars
and maybe trying to redraw itself.

ok, Suspend/ResumeLayout doesn't help.

grd.DataSource = null;
// update & filter here
grd.DataSource = dataview;

works but scrollbar positions are lost
after rebinding.
maybe that's no problem - i'll try
to store/restore scrollbars with windows scrollbar api.

but maybe there's some pure NET way to get
the DataGrid just taking rest while DataView is busy
with the stuff?

alex.
 
Hi,

Why don't you store last position or last selected pk and reapply the
position to BindingManagerBase at the end?
 
the record position is stored in case of the rebinding,
there's no problem with it.

but the grid loses its scrollbar positions
so after rebinding the grid 'scrolls up' to the first row
although the record position stays the same.
 
Back
Top