E
Ethan Strauss
Hi,
I was just about to wrap some code for filling a DataViewGrid in
grid.SuspendLayout();
//Grid filling code
grid.ResumeLayout();
when I got worried t hat something might go wrong in the filling code and
ResumeLayout() would never get called. I considered putting ResumeLayout in a
finally block, but thought I would see what happens if I leave it out
completely. I tested the code with SuspendLayout and no ResumeLayout and I
don't see any problem at all!
What happens if ResumeLayout is not called? I assume it is being forced by
default somewhere. Would it be wiser to put all SuspendLayouted actions in
try blocks with ResumeLayout in finally blocks?
Thanks!
Ethan
I was just about to wrap some code for filling a DataViewGrid in
grid.SuspendLayout();
//Grid filling code
grid.ResumeLayout();
when I got worried t hat something might go wrong in the filling code and
ResumeLayout() would never get called. I considered putting ResumeLayout in a
finally block, but thought I would see what happens if I leave it out
completely. I tested the code with SuspendLayout and no ResumeLayout and I
don't see any problem at all!
What happens if ResumeLayout is not called? I assume it is being forced by
default somewhere. Would it be wiser to put all SuspendLayouted actions in
try blocks with ResumeLayout in finally blocks?
Thanks!
Ethan