Home › Forums › Guriddo jqGrid JS › Help › setFrozenColumns HELP!!!!!!!!!!!!!! PLEASE!!!!!!!!!!!!
Hi….someone, please!!
I am trying to freeze my first grid column but with no luck.
Hello,
I preffer you to click on the documentation menu
Kind Regards
@slykiwi
Tony,
I had already looked at the documentation and know what I am meant to do i.e:
jQuery(“#dataGrid”).jqGrid('setFrozenColumns');
&
frozen:true
but I can't seem to get it to work, HENCE I posted on here.
Probably you will find the answers on your question in the answer and in this one.
Best regards
Oleg
Hey Oleg,
Thanks for the prompt reply.
Hello,
many parts of my old code which you posted will be probably not important for you. You should just define the
Thanks again Oleg,
This will be my last post before I give up on this thing!
I keep getting the error $grid[0] is undefined.
Here is my final mix of your demol and my code.
Hello,
There is enought time to give up.
You should call these lines of code
$grid.jqGrid('setFrozenColumns');
within the success ajax function and not outside it.
$.ajax({
….
success : function (…)
{
…
Hello,
I want to add one more probelm in your JSON data additionally to the problem described by Tony. The JSON data which you posted one sees that you set the property frozen:true only for hidden column. So no frozen columns will be created and so $grid[0].p._complete will be null. If you want to make your code working without errors in the situation you should use
if ($.isFunction($grid[0].p._complete)) { $grid[0].p._complete.call($grid[0]); }
In any way if you want to test setFrozenColumns method you should define at least one non-hidden column having frozen:true.
Best regards
Oleg
Hey Tony / Oleg….
Ok, Im not yet ready to give up on this.
Hello,
the code which you posted gives not so many information because you don't posted the JSON data which can be used to reproduce your problem. The demo use datatype: 'json' and it do work.
If you post the full code which can be used to reproduce your problem one could find the reason of your problem.
Best regards
Oleg
Hi Oleg,
Here is a complete dump of the Coldfusion serialized JSON data after calling my cfc:
{“colModelList”:[{“name”:”PRDID”,”sortable”:false,”frozen”:true,”label”:”Item Description”,”width”:200.0,”editable”:false,”index”:”PRDID”},{“name”:”Jan”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”January”,”align”:”right”},{“name”:”Feb”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”February”,”align”:”right”},{“name”:”Mar”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”March”,”align”:”right”},{“name”:”Apr”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”April”,”align”:”right”},{“name”:”May”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”May”,”align”:”right”},{“name”:”Jun”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”June”,”align”:”right”},{“name”:”Jul”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”July”,”align”:”right”},{“name”:”Aug”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”August”,”align”:”right”},{“name”:”Sep”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”September”,”align”:”right”},{“name”:”Oct”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”October”,”align”:”right”},{“name”:”Nov”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”November”,”align”:”right”},{“name”:”Dec”,”sortable”:false,”width”:100.0,”editable”:false,”label”:”December”,”align”:”right”},{“name”:”Total”,”sortable”:false,”width”:130.0,”editable”:false,”label”:”Total”,”align”:”right”}],”pfcTills”:{“gridData”:[{“Mar”:”$2,519.95″,”Sep”:”$13,638.00″,”Aug”:”$12,887.75″,”Nov”:”$20,306.00″,”Feb”:”$9,944.95″,”Total”:””,”May”:”$26,688.35″,”Jul”:”$10,060.45″,”Jun”:”$12,228.85″,”Jan”:”$10,558.40″,”Oct”:”$23,500.95″,”PRDID”:”Opening Cash on Hand”,”Dec”:”$19,159.55″,”Apr”:”$7,769.65″},{“Mar”:””,”Sep”:””,”Aug”:””,”Nov”:””,”Feb”:””,”Total”:””,”May”:””,”Jul”:””,”Jun”:””,”Jan”:””,”Oct”:””,”PRDID”:”Cash In”,”Dec”:””,”Apr”:””},{“Mar”:”$60,570.00″,”Sep”:”$55,000.00″,”Aug”:”$55,000.00″,”Nov”:”$55,000.00″,”Feb”:”$47,302.00″,”Total”:”$677,002.00″,”May”:”$45,000.00″,”Jul”:”$55,000.00″,”Jun”:”$55,000.00″,”Jan”:”$54,130.00″,”Oct”:”$55,000.00″,”PRDID”:”From Lenders A/C”,”Dec”:”$65,000.00″,”Apr”:”$75,000.00″},{“Mar”:”$80.00″,”Sep”:”$100.50″,”Aug”:”$40.00″,”Nov”:”$0.00″,”Feb”:”$80.00″,”Total”:”$1,439.35″,”May”:”$200.30″,”Jul”:”$417.50″,”Jun”:”$280.00″,”Jan”:”$144.55″,”Oct”:”$16.50″,”PRDID”:”Mon-e & Advantage Default fees”,”Dec”:”$0.00″,”Apr”:”$80.00″},{“Mar”:”$231.00″,”Sep”:”$445.50″,”Aug”:”$2,261.03″,”Nov”:”$520.00″,”Feb”:”$676.50″,”Total”:”$7,500.03″,”May”:”$412.50″,”Jul”:”$445.50″,”Jun”:”$462.00″,”Jan”:”$643.50″,”Oct”:”$313.50″,”PRDID”:”Brokered Cash Advance Default Fees”,”Dec”:”$462.00″,”Apr”:”$627.00″},{“Mar”:”$27,015.65″,”Sep”:”$22,334.13″,”Aug”:”$19,728.84″,”Nov”:”$20,970.07″,”Feb”:”$24,267.73″,”Total”:”$263,295.48″,”May”:”$22,236.16″,”Jul”:”$21,670.49″,”Jun”:”$18,700.82″,”Jan”:”$18,556.16″,”Oct”:”$21,006.10″,”PRDID”:”Brokered Cash Advance OTC Payments”,”Dec”:”$17,693.43″,”Apr”:”$29,115.90″},{“Mar”:”$0.00″,”Sep”:”$0.00″,”Aug”:”$0.00″,”Nov”:”$0.00″,”Feb”:”$0.00″,”Total”:”$26.00″,”May”:”$0.00″,”Jul”:”$0.00″,”Jun”:”$26.00″,”Jan”:”$0.00″,”Oct”:”$0.00″,”PRDID”:”WU Received from Customers”,”Dec”:”$0.00″,”Apr”:”$0.00″},{“Mar”:”$85.00″,”Sep”:”$112.35″,”Aug”:”$267.70″,”Nov”:”$69.40″,”Feb”:”$42.00″,”Total”:”$1,574.81″,”May”:”$20.00″,”Jul”:”$497.61″,”Jun”:”$106.10″,”Jan”:”$60.00″,”Oct”:”$46.30″,”PRDID”:”Cheque Cashing Income”,”Dec”:”$180.35″,”Apr”:”$88.00″},{“Mar”:”$294.00″,”Sep”:”$1,011.15″,”Aug”:”$2,426.01″,”Nov”:”$103.00″,”Feb”:”$378.00″,”Total”:”$12,218.98″,”May”:”$0.00″,”Jul”:”$5,508.53″,”Jun”:”$1,154.59″,”Jan”:”$360.00″,”Oct”:”$416.70″,”PRDID”:”Other”,”Dec”:”$0.00″,”Apr”:”$567.00″},{“Mar”:”$88,348.40″,”Sep”:”$79,454.96″,”Aug”:”$79,723.58″,”Nov”:”$78,328.38″,”Feb”:”$72,746.23″,”Total”:”$966,351.33″,”May”:”$67,868.96″,”Jul”:”$83,539.63″,”Jun”:”$75,729.51″,”Jan”:”$73,955.11″,”Oct”:”$77,223.23″,”PRDID”:”Total Cash In”,”Dec”:”$83,955.44″,”Apr”:”$105,477.90″},{“Mar”:””,”Sep”:””,”Aug”:””,”Nov”:””,”Feb”:””,”Total”:””,”May”:””,”Jul”:””,”Jun”:””,”Jan”:””,”Oct”:””,”PRDID”:”Cash Out”,”Dec”:””,”Apr”:””},{“Mar”:”$81,261.00″,”Sep”:”$66,852.25″,”Aug”:”$75,828.53″,”Nov”:”$78,028.42″,”Feb”:”$79,063.00″,”Total”:”$930,218.47″,”May”:”$81,167.11″,”Jul”:”$74,355.64″,”Jun”:”$75,865.85″,”Jan”:”$70,934.23″,”Oct”:”$79,460.96″,”PRDID”:”Brokered Cash Advance Out”,”Dec”:”$82,549.71″,”Apr”:”$84,851.77″},{“Mar”:”$0.00″,”Sep”:”$0.00″,”Aug”:”$0.00″,”Nov”:”$0.00″,”Feb”:”$0.00″,”Total”:”$0.00″,”May”:”$0.00″,”Jul”:”$0.00″,”Jun”:”$0.00″,”Jan”:”$0.00″,”Oct”:”$0.00″,”PRDID”:”Western Union Money Out”,”Dec”:”$0.00″,”Apr”:”$0.00″},{“Mar”:”$1,484.04″,”Sep”:”$2,231.19″,”Aug”:”$2,731.94″,”Nov”:”$1,425.25″,”Feb”:”$672.01″,”Total”:”$24,737.44″,”May”:”$789.84″,”Jul”:”$5,822.26″,”Jun”:”$1,686.01″,”Jan”:”$3,141.92″,”Oct”:”$913.00″,”PRDID”:”Banked to Store A/C”,”Dec”:”$2,459.73″,”Apr”:”$1,380.25″},{“Mar”:”$253.80″,”Sep”:”$468.40″,”Aug”:”$412.22″,”Nov”:”$22.00″,”Feb”:”$390.91″,”Total”:”$3,546.03″,”May”:”$371.64″,”Jul”:”$527.32″,”Jun”:”$346.52″,”Jan”:”$393.58″,”Oct”:”$11.00″,”PRDID”:”Other Expenses”,”Dec”:”$22.00″,”Apr”:”$326.64″},{“Mar”:”$82,998.84″,”Sep”:”$69,551.84″,”Aug”:”$78,972.69″,”Nov”:”$79,475.67″,”Feb”:”$80,125.92″,”Total”:”$958,501.94″,”May”:”$82,328.59″,”Jul”:”$80,705.22″,”Jun”:”$77,898.38″,”Jan”:”$74,469.73″,”Oct”:”$80,384.96″,”PRDID”:”Total Cash Out”,”Dec”:”$85,031.44″,”Apr”:”$86,558.66″},{“Mar”:”$2,519.95″,”Sep”:”$13,638.00″,”Aug”:”$12,887.75″,”Nov”:”$20,306.00″,”Feb”:”$9,944.95″,”Total”:””,”May”:”$26,688.35″,”Jul”:”$10,060.45″,”Jun”:”$12,228.85″,”Jan”:”$10,558.40″,”Oct”:”$23,500.95″,”PRDID”:”Opening Cash on Hand”,”Dec”:”$19,159.55″,”Apr”:”$7,769.65″},{“Mar”:”$88,348.40″,”Sep”:”$79,454.96″,”Aug”:”$79,723.58″,”Nov”:”$78,328.38″,”Feb”:”$72,746.23″,”Total”:””,”May”:”$67,868.96″,”Jul”:”$83,539.63″,”Jun”:”$75,729.51″,”Jan”:”$73,955.11″,”Oct”:”$77,223.23″,”PRDID”:”Gross Total In”,”Dec”:”$83,955.44″,”Apr”:”$105,477.90″},{“Mar”:”$82,998.84″,”Sep”:”$69,551.84″,”Aug”:”$78,972.69″,”Nov”:”$79,475.67″,”Feb”:”$80,125.92″,”Total”:””,”May”:”$82,328.59″,”Jul”:”$80,705.22″,”Jun”:”$77,898.38″,”Jan”:”$74,469.73″,”Oct”:”$80,384.96″,”PRDID”:”Out Total”,”Dec”:”$85,031.44″,”Apr”:”$86,558.66″},{“Mar”:”$7,869.51″,”Sep”:”$23,541.12″,”Aug”:”$13,638.64″,”Nov”:”$19,158.71″,”Feb”:”$2,565.26″,”Total”:””,”May”:”$12,228.72″,”Jul”:”$12,894.86″,”Jun”:”$10,059.98″,”Jan”:”$10,043.78″,”Oct”:”$20,339.22″,”PRDID”:”Amount That Should Be In Till”,”Dec”:”$18,083.55″,”Apr”:”$26,688.89″},{“Mar”:”$7,769.65″,”Sep”:”$23,500.95″,”Aug”:”$13,638.00″,”Nov”:”$19,159.55″,”Feb”:”$2,519.95″,”Total”:””,”May”:”$12,228.85″,”Jul”:”$12,887.75″,”Jun”:”$10,060.45″,”Jan”:”$9,944.95″,”Oct”:”$20,306.00″,”PRDID”:”Acutal Amount In Till”,”Dec”:”$18,086.90″,”Apr”:”$26,688.35″},{“Mar”:”($99.86)”,”Sep”:”($40.17)”,”Aug”:”($0.64)”,”Nov”:”$0.84″,”Feb”:”($45.31)”,”Total”:”($320.89)”,”May”:”$0.13″,”Jul”:”($7.11)”,”Jun”:”$0.47″,”Jan”:”($98.83)”,”Oct”:”($33.22)”,”PRDID”:”Cashier's Discrepancy”,”Dec”:”$3.35″,”Apr”:”($0.54)”}]}}
The data loads into the grid without any problem. I hope this helps you to help me.
Thanks.
Everything is easy if one can reproduce the problem.
You should remove sortable: true option from the grid to be able to use frozen columns: see the modified demo.
Look at the documentation about the limitations in the current implementation or look the line of jqGrid code.
Best regards
Oleg
FIXED!
Frozen cols is great improvement but…We need use celledit together
There is an alternative way but I don't know how to implement…
Allocate 2 grids NO FROZEN cos, left grid contains 'fixed' cols, right grid contains all editable cols but none frozen cols.
The only problem is capture scroll event from two grids and sync both toprow
But I don't know how to do that.
Heavyvice
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top