rajesh_khater
asked on
Finding if the form is loaded
I am starting a form in Maximized mode.
The Form Resize event is getting fired before the Form Load event.
In the Form Resize event, I am resizing a DataGridView. but I get an error that row index is out of bounds.
What is the best way to trigger the resize code after the form is fully loaded?
I know I can keep a flag in Form Loaded and set it to true. Is there any other way?
The Form Resize event is getting fired before the Form Load event.
In the Form Resize event, I am resizing a DataGridView. but I get an error that row index is out of bounds.
What is the best way to trigger the resize code after the form is fully loaded?
I know I can keep a flag in Form Loaded and set it to true. Is there any other way?
Why do you use Rowindex at all in Resize event? You should resize DataGrdiView's height, and width, and if necessary, Columns height.
Goran
Goran
ASKER
I need to coz I want the grid's Height to be only as much as not to have any partially visible rows.
The code I am using is from:
https://www.experts-exchange.com/questions/22698846/How-NOT-to-have-partially-visible-rows-in-DataGridView.html
The code I am using is from:
https://www.experts-exchange.com/questions/22698846/How-NOT-to-have-partially-visible-rows-in-DataGridView.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Andrew