1
Help for ParamQuery Pro / Re: When I call the "flex" method, the bottom line overflows
« on: May 15, 2020, 05:59:20 am »
Thank you for your nice advice.
My worries have been resolved.
My worries have been resolved.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<div id="testGrid" style="margin:auto;"></div>
<script>
function refresh() {
var $grid = $("#testGrid");
var obj = $grid.pqGrid("getViewPortIndx");
for(var idx = obj.finalH; idx > obj.initH; idx--) {
$grid.pqGrid("flex", idx);
}
}
$(function() {
var colModel = [ {"title":"4/1<br>(Mon)","dataType":"string","dataIndx":"data1","halign":"center"}
,{"title":"4/2<br>(Tue)","dataType":"string","dataIndx":"data2","halign":"center"}
,{"title":"4/3<br>(Wed)","dataType":"string","dataIndx":"data3","halign":"center"}
];
var dataModel = {"location":"local","curPage":1,"dataType":"JSON","data":[
{ data1: 'a', data3:'aaaaaaaaaaaaaaaa' }, { data1: 'b' }, { data1: 'c' },{ data1: 'd' },{ data1: 'e' },{ data1: 'f'}
, { data2: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }
]};
var obj = {"width":"auto","height":"200","showTitle":true,"numberCell":{"show":false},"draggable":false,"wrap":true,"stripeRows":true}
obj.colModel = colModel;obj.dataModel = dataModel;
var grid = $("#testGrid").pqGrid(obj);
grid.pqGrid({ scroll: function(event) { setTimeout(function() { refresh(); }, 500)}});
refresh();
});
</script>