jQWidgets Forums

jQuery UI Widgets Forums Grid Is there a way to emulate a Auto shrink

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Is there a way to emulate a Auto shrink #32286

    morgenweck
    Participant

    I have a grid that it seems that it displays about 13 rows if I do not set the height. This is fine when I have a 15 or so records. Is there a way that I can shrink the height of the display area when I only have 1 or 2 records and a little bit larger when there are 4 or 5 etc. I have additional information that gets displayed after the grid renders and if there is only one or two records it looks blank. I’m counting the records from the data source so do I need to do it manually? If so do you have a snippet of code that I could include because I’m not sure where the best place to adjust the grids area would be located.

    var dataAdapter = new $.jqx.dataAdapter(source, {
    loadComplete: function () {
    var length = dataAdapter.records.length;
    jQuery(“#Text2”).val(length);
    }
    }
    );

    Also, I’m not sure that this is the best way to count the rowcount.

    Thanks

    Is there a way to emulate a Auto shrink #32292

    Peter Stoev
    Keymaster

    Hi morgenweck,

    The Grid has a property called “autoheight”. When it is set to true, the Grid’s height would be equal to the summary height of its rows.

    Best Regards,
    Peter Stoev

    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.