jQWidgets Forums

jQuery UI Widgets Forums Grid autoheight and height work together?

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 8 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • autoheight and height work together? #89914

    walker1234
    Participant

    1) Does the above two features work together? I want to have autoheight feature with the pageable: true option. But in the scenario, when there is no data available, the autoheight feature shrinks the grid to very small size. I was wondering if it’s possible to set the height in this case of non availability of any data. I tried using both but it looks like defining fixed height doesn’t work.

    2) By default, the pageable : true sets the grid to 10 rows, is it possible to have it reduced to 5 rows?

    Thanks

    autoheight and height work together? #89953

    ivailo
    Participant

    Hi walker1234,

    Both features are not created to work together, but you can create a workaround for it.
    You can set autoheight:true by default and calculate in the ready callback how many rows you have. If their count is below particular number to set

    autoheight:false,
    height:180

    for example.

    If you want 5 rows – set pagesize: 5.

    Please, refer to the following grid example.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.