Resizing flexigrid..Help needed |
[eluser]Neo_Ankit[/eluser]
Hi Guys, I am unable to resize flexigrid programmatically. Here is what my page layout looks like:- -------------------------------------------- <div> <table> <tr> <td> <div> <table> <tr> <td> //link to show div with id "SearchBox" <a id="lnkShowSearchBox"> </td> </tr> </table> // this is the div shown on hyperlink click <div id="searchBox"> </div> </div> </td> </tr> </table> </div> <div id="grid" style="width: 100%;"> <table id="tblGrid" style="display: none;width: 100%;"> </table> </div> Here is the javascript to create grid:- ---------------------------------------------- $("#tblGrid").flexigrid({ dataType: 'json', colModel: [ { display: 'Col1', name: 'Col1', width: 380, sortable: false, align: 'left' }, { display: 'Col2', name: 'Col2', width: 80, sortable: false, align: 'left' }], width: 'auto', height:400, usepager: true, resizable: false, useRp: true, rp: 14, title: false }); Here is the javascript to resize grid :- ---------------------------------------------------------------------------- $('#tblGrid').flexOptions({ height: 50 }); $('#tblGrid').flexReload(); I tried various combination like setting resizable to true, setting height to 'auto', but in vain. The problem is that grid retains its actual size even though I try to set height to 50 px Please help. Thanks in advance. Ankit
[eluser]umefarooq[/eluser]
here is the solution for your problem check the following link http://flexigrid.eyeviewdesign.com/index...grid/index#
[eluser]Neo_Ankit[/eluser]
Thank you very much for the quick reply. But unfortunately, we are not in a position to upgrade existing flexigrid(lot of changes required and time frame is limited) Could you please suggest a solution with the exisiting grid only? Thanks and regards, Ankit
[eluser]Neo_Ankit[/eluser]
I also noticed one thing. The code in flexReload() calls grid.populate().But since no url is set as parameter, the function return false. What is this url parameter and actually why do i have to reload entire grid just to re size its height? I hope there should be an easier way to do that. Please guys help me Ankit
[eluser]Neo_Ankit[/eluser]
I found a solution:- // To set grid properties(useful when next postback, paging, sorting happens) $('#tblGrid').flexOptions({ height: 100}); // Hack to reset height(works if there is only one grid on the page) $(".bDiv")[0].style.height = "100px"; Regards, Ankit |
Welcome Guest, Not a member yet? Register Sign In |