|
Title: Set pageSize of grid depends on screen height Post by: manojvijayan on November 21, 2012, 09:38:04 PM I have created a grid panel using Easy UI. The grid panel is fit to all screens.The page size of grid is 20. In small screens, the grid has scrolling. In wide screen,there is some blank space between last record and pagination tool even though there is more than 20 records.In this blank space, we can accommodate 4 or 5 records.
Please see the attached file.There is 2 pages [25 records]. First page shows 20 records. Some blank space is shown after the 20th record. I want 15 records for small screens and 25 records for wide screens.There should not be scroll bar and blank space. How can dynamically set the pageSize of grid depends on screen height or grid height ? Is there any function to get the height of grid panel? Title: Re: Set pageSize of grid depends on screen height Post by: stworthy on November 22, 2012, 02:35:48 AM Notice that your datagrid is placed on center panel of layout. The code below can get the datagrid outer height.
Code: var height = $('body').layout('panel','center').height();Code: var height = $('#dg').datagrid('getPanel').panel('panel').outerHeight();Title: Re: Set pageSize of grid depends on screen height Post by: Ellipsis on December 06, 2012, 02:55:36 AM Thanks I"ll use the panel height to hide the vertical scrollbar when possible :)
|