Column Widths Not Scaling Properly Across Resolutions

Posted by: andrea.davoli on 25 June 2025, 6:52 am EST

  • Posted 25 June 2025, 6:52 am EST - Updated 25 June 2025, 6:57 am EST

    Hi everyone,

    We’re experiencing an issue with column widths in our application.

    We create a table and set specific column widths, but when the application is used on different screen resolutions, the columns don’t always display correctly.

    Is there a way to define column widths in a more flexible or responsive way—perhaps using percentages or some other method—so that the layout appears consistently across all resolutions?

    Correct display:

    Display with issues:



    As you can see, the last column is too big

    Thanks in advance for your help!

  • Posted 26 June 2025, 6:56 am EST

    Hi,

    It seems you are using the C1FlexGrid control. Just for your information, setting the column widths to a fixed pixel value can lead to inconsistent behavior across monitors with different resolutions and DPI settings.

    To define column widths in a proportional way, you can use the star-sizing feature of the FlexGrid, which allows you to specify column widths in percentage or ratio-based units. This approach ensures the columns adjust correctly based on the available space.

    https://developer.mescius.com/componentone/docs/win/online-flexgrid/column-sizing.html#i-heading-star-sizing

    Best Regards,

    Kartik

  • Posted 27 June 2025, 4:09 am EST

    @andrea.davoli DPI awareness is rather complex and a horrible area ;-). So a few questions about your environment: .NET framework 4.8 or .NET 8?

    If you use .NET 8: do you make a call to “Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);” in startup? If using .NET framework, this is enabled in a app.manifest file.

    Or do you use another approach for handling screen scaling?

    I am not sure whether C1FlexGrid scales the controls if the application is dpi aware, but I hope it does.

    Best regards

    Wolfgang

  • Posted 2 July 2025, 5:35 am EST

    Hi Kartik, hi Wolfgang,

    Thanks a lot for your suggestions!

    I’m currently using both a .NET Framework 4.8 version and a .NET 8 version of the application.

    I’ve started experimenting with the StarWidth approach in the C1FlexGrid, and it seems to be working really well

    Best regards,

    Andrea

  • Posted 2 July 2025, 6:13 am EST

    Hi Andrea,

    We’re glad to hear that your requirement has been fulfilled. Please feel free to test this approach further, and if you encounter any issues, you can always create a new thread.

    Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels