how to get layout across diff monitors

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My data grid has props 840,28
The form has 880, 54

When I view the layout on my laptop its wide enough to capture the data that needs to be displayed
When I view it on a 20" monitor, the layout looks about the same

On a 17" monitor the form seems to have grown off the screen somewhat but the datagrid seems to have retained its width properties - because a sizeable gap exists between it and the form

Any suggestions as how to approach this issue ? Thanks
 
Hi Andrew,

Thank you for posting in the community!

Do you refer to a Windows Form application? I think you have placed a
WinForm datagrid control on a Form.

For your problem:
"On a 17" monitor the form seems to have grown off the screen somewhat but
the datagrid seems to have retained its width properties - because a
sizeable gap exists between it and the form."

I still did not understand it clearly. Can you explain it more details?

Also, if you want to keep the datagrid with the same scale with the Form, I
think you can set the control's Anchor property to "Top, Bottom, Left,
Right", then the datagrid will be locked with the certain scale with the
Form.

I will wait feedback from you, thanks.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Andrews,

Thanks very much for your feedback.

For your further problem, I think your datagrid may be re-sized due to
monitor DPI changed. So the column does not persist the same scale with the
datagrid.

To workaround this issue, I think you should calculate the column width
dynamically through the ratio with the datagrid size yourself. You may try
to hook into SizeChanged and Layout event of DataGrid control.

Please try my suggestion to see if resolved your issue. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Andrew,

I will wait for your feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Andrew,

Is your problem resolved?

If you still have concern, please feel free to post, I will help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thanks for the reminder - I have had to work a couple of other issues - and will return to this in a couple of days. The suggestion sounds fine, I just have to put the code into implement it.... thanks
 
Hi Andrew,

Ok, I will wait for your feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top