-
Notifications
You must be signed in to change notification settings - Fork 197
Description
@OlegKi
When use GridUnload, and then create grid again, and the option pager:true (no pager div used), the jqgrid create a "weird" div below the "gbox" div. This occurs every time is recreated the grid.
This a code example (sorry for can't give a real demo link)
As you can see, I created a button just for testing, which calls the setGrid() function, where the grid is "recreated". The first time you click the button is ok, but next time you click it, appears a thin line below the grid box (which actually is <div id="jqg1" class="ui-state-default ui-corner-bottom"></div>), and every time you recreate the grid (click the button again many times), it adds a new div like mentioned. with a new id (i.e "jqg2", "jqg3"...)
(I'm using free-jqgrid-4.13.6 with Chrome)
<button id="testbtn">TEST</button>
<table id="myGrid"></table>
<script type="text/javascript">
$(document).ready(function() {
$('#testbtn').on('click', function() {
setGrid();
})
function setGrid() {
myData = [
{id:'1', a:'aaaa1', b:'bbbb1', c:'cccc1'},
{id:'2', a:'aaaa2', b:'bbbb2', c:'cccc2'},
{id:'3', a:'aaaa3', b:'bbbb3', c:'cccc3'},
];
$("#myGrid").jqGrid('GridUnload');
$("#myGrid").jqGrid({
data: myData,
datatype: "local",
colModel: [
{name:'id', label:'Id', width:50},
{name:'a', label:'A', width:100},
{name:'b', label:'B', width:100},
{name:'c', label:'C', width:100},
],
pager: true,
caption: 'test grid',
})
}
});
</script>