Currently pager can be passed into jqGrid and navGrid as string selector only. For example
...navGrid("#selectedRowsPager",...
But here is my problem. I create a grid with forms edit, and I define one of columns as custom element. And I use another grid to represent this custom column in forms edit mode.
The “custom_element” function must return newly built element. The jqGrid will attach this element. So during the custom column build process the element is not attached to the document yet. This is why
$("
“).jqGrid({…, pager: “#selectedVerticalPager”})
will fail: there is no #selectedVerticalPager attached to the document.body yet.
Admitedly, this can be fixed by attaching html fragment to the body before calling jqGrid, but it seems rather a hack. And it is just weird that I am forced to pass selector which needs to be resolved when I have actual object in hands.
Insted I changed the code so that it can accept pager definitition either as string or as dom/jquery object. I did not tested the patch extensively, just made sure “it works for me”. You can find my commit here:
http://github.com/vchekan/jqGrid/commit/a0bf09111d3662dd9fa02be2a7935527a0759a8a
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top