Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
How to dynamically adjust datagrid's height, and fill-in content, even with paging
posted

Hello:

    User is migrating from WPF, and is asking if:

1) datagrid's height can be auto-adjusted, based on visible screen height. (i do notice, if the height is exceeding certain values, eg 740px, the width cannot be auto-adjusted to fit screen width, when column pinning is on). User could be changing the browser's zooming, eg changing from 100%>90%>80%, or vice versa, yet still maintain the auto-adjusted datagrid's height.

2) auto fill-in enough of content, even with paging, eg. if auto-fill 15 records if height with 1000px, and set paging to 15 rows; auto-fill 10 records if height with 700px, and set paging to 10 rows. the figure is an example and it could be any random number.

   Thanks.

Parents
No Data
Reply
  • 2860
    Verified Answer
    Offline posted

    Hi Gan,

    Thank you for contacting Infragistics Developer Support!

    For any component in general, probably the most versatile approach to auto-adjust based on the available screen space would be to set its height in percentages. For more information about this approach, please, check out this section of our documentation.

    To address your second question, sure, this is possible with a custom implementation on application level. For your convenience, I implemented a sample demonstrating a possible approach. Please, check it out and feel free to implement it and additionally, modify it further to best fit your application requirements. Additionally, please, make sure to fully test it aganst edge scenarios, since it is an application solution that is not part of the library itself.

    Let me know if you need any further assistance on the matter.

    Best regards,
    Bozhidara Pachilova
    Software Developer

Children
No Data