Hello,
We have managed to find the bug using your example. Thanks.
You can download the fixed version from GitHub.
Please let us know if the fix is ok for you.
Thank you.
Kind Regards,
Will
Guriddo Support Team
Hello,
The error:
Uncaught TypeError: Cannot read property ‘isLeaf’ of undefined
tell us that this property is always not defined and we should investigate this since you have the same code when the tree is setup:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
... } $($t.rows<em class="d4pbbc-italic"></em>.cells[expCol]) .find("div.treeclick") .bind("click",function(e){ var target = e.target || e.srcElement, ind2 =$.jgrid.stripPref($t.p.idPrefix,$(target,$t.rows).closest("tr.jqgrow")[0].id), pos = $t.p._index[ind2]; if(!$t.p.data[pos][isLeaf]){ if($t.p.data[pos][expanded]){ $($t).jqGrid("collapseRow",$t.p.data[pos]); $($t).jqGrid("collapseNode",$t.p.data[pos]); } ... |
So the question is where is isLeaf property in the same data parameter?
We will try to use your example.
Kind Regards,
Will
Guriddo Support Team
Hello Juergen,
Thank you for the description and the code.
In order to have full picture of the problem, could you please send the code and sample data to support at guriddo dot net? This way we will easy detect the problem.
Thank you very much
Kind Regards,
Will
Guriddo Support Team
Hello,
Can you please, send us the jqGrid setup if possible (without any change)?
The best will be if you can prepare a example and send it to us.
We can easy fix this error, but we want to investigate the nature of the problem.
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
Basically a onSelectRow can be used. On this event you should grab the selected ids and loop to find the sum of the selected item of freigt.
Below is a working code (of the same example). You can optimize the code very weel. It is just idea how this can be realized.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
... $grid->setGridOptions(array( "rowNum"=>10, "sortname"=>"OrderID", "rowList"=>array(10,20,30), "footerrow"=>true, "multiselect"=>true)); $onselect = <<< ONSELECT function(rowid, selected) { var sar = $(this).jqGrid('getGridParam', 'selarrrow'); function sumCols(arr, grid, sumCol) { // sumCol is the index of Freight var j, len = arr.length, sum = 0, v; for(j=0; j< len; j++) { v = parseFloat( $("#"+arr[j],grid).find('td:eq('+sumCol+')').html()); if(v != null) { sum += v; } } return sum; } var pdata=[]; pdata['Freight'] = sumCols( sar, this, 4 ); if(!isNaN(pdata['Freight'])){ $(this).jqGrid('footerData', 'set', pdata, true); } } ONSELECT; $grid->setGridEvent('onSelectRow', $onselect); ... |
Please let us know if this resolved your problem.
Thank you
Kind Regards,
Will
Guriddo Support Team
Hello,
We have tested setRegional with grid conainibg texts as you described, bu we can not reproduce the problem.
Could you please send us grid setup and data so that the problem is shown?
I appreciate a help for this problem, since it is a very bad problem in the security.
Kind Regards,
Will
Guriddo Support Team
Hello,
Not sure, but the counting in colModel begin from 0 (iCol) – i.e 0 is the first field I, the second (1) is FA and etc.
Kind Regards,
Will
Guriddo Support Team
Hello,
We have rework the reloadNode so that if a leaf is refreshed and there are data its icon is set correct and vice versa. https://github.com/tonytomov/jqGrid/commit/37fe0899f96f728e294a84c06fe20fe458b449c4
We have added setLeaf method which is used automatically in reloadNode.
We have added second parameter in reload node – reloadcurrent. The default is false.
If set to true the the entrie node is deleted and you will need to provide the data for the childern and the same node – i.e the entrie node is refreshed. We found the second method more usefull since the entrie row data is referched, not only the icons.
You can download the new build from git hub and test it. Please let us know if everything is ok.
Thank you
Kind Regards
Will
Guriddo Support Team
Hello,
We tested the described situation and found a bug in the code. The problem is fixed and you can download the fixed code from GitHub.
Kind Regards,
Will
Guriddo Support Team
Hello,
Which version of jqGrid JavaScript is used?
In the code we try to open the info dialog and if it is not available, then we use alert. This means:
1. You use old version which does not include the fix
2. Your build of jquery.jqGrid.js does not include info dialog function.
Kind Regards
Will
Guriddo Support Team
The above means
|
1 2 3 4 |
... SELECT .... FROM .... WHERE company_id = 'CarMax'; ... |
Please, prepare a demo dump tables in the query and send your script code too. I’m sure that this way we will resolve the problem
Regards
Guriddo Support Team
From your initial post the searchField, SearchOper and etc are empty, but filters parameter is used.
With simple words the code check first for filters parameter and then searchOper and etc values.
Check to see if your filters string is correctly build.
Kind Regards,
Will
Guriddo Support Team
Hello,
I think that the filters parameters should be get.
So lets go from the beginning.
Try to install our demo on your server.
Actually you will need just to set the config file.
My question is : Is the searching in demo working?
Kind Regards,
Will
Guriddo Support Team
Hello,
We have just fixed a loadState to support TreeGrid : https://github.com/tonytomov/jqGrid/commit/18c448551ddc0c712e2e1062a2303fa208729208
You can get the build from GitHub and test it. Currently working on reloadNode.
Regards
Will
Guriddo Support Team
Hello,
Thank you for the information and code provided.
What you mean with default search?
I do not see any code for default search.
We have a demo called search upon loading – did you refer to this demo or something else.
What you mean with : If I manually fill in the search parameters for the GET request then it works as expected.
Kind Regards
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top