When treeGrid: true is set then search is not working…
I have following code to enable search option
$(‘#treegrid’).jqGrid(‘filterToolbar’, { stringResult:false, searchOnEnter: true });
Â
I am using latest version.
Hello,
First of all thank you for look on this and perform a testing.
When downloading from github you will need to replace only 3 files
jquery.jqGrid.min.js
ui.jqgrid.css (or ui.jqgrid-bootstrap.css if Bootstrap is used)
the appropriate language file.
For testing purpose you can replace the minified jquery.jqGrid.min.js with the sourcecode jquery.jqGrid.js
I can’t imagine how can I order a cake and can’t it.!
This was a small chalnge for me, but actually the idea is to change thed data type to local before searching and put it back after the search is done. I have implemented this using the two events beforeSearch and afterSearch (suppose you use filter toolbar)
Here is the demo, which I have prepared for this purpose: Link to demo
In the demo I use beforeRequest to change the json data file – so this is not connected with our problem.
Unfortunately I can not reproduce the problem when we initially serch and after this we perform a sort. It will be very good if you can provide a simple test case with data.
Please let us know if there is a problem.
Kind Regards,
Hello again,
We need to fix the problem where the search results should be expended in case if they are not
Regards,
Thank you,
You can’t have your cake and eat it is an old English proverb.
In this case you have demonstrated that the seemingly impossible is actually quite simple to achieve 🙂
.
I will see if I can recreate my sort problems when using the correct setup,
MymsMan
Hello,
You can’t have your cake and eat it is an old English proverb.
Thank you very much for the information.
Initially I don’t have understand this, because English is not my native language.
In my native language we have similar proverb, but it isn’t the place to discuss this here.
Good news: we are able to reproduce the problem with sorting after searching using our approach in our jqGrid PHP component. I will try to investigate the problem during the weekends. In the meantime if you find something, please let us know – it will help us to fix this quicker.
Have a nice weekend.
Best Regards,
The beforeSearch/afterSearch to switch between local/json is working very nicely, thank you
.
I am still getting errors with searching after filtering.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
TypeError: obj is undefined line 292 js/jquery.jqGrid.js?1.2.8-3 getAccessor : function(obj, expr) { var ret,p,prm = [], i; if( typeof expr === 'function') { return expr(obj); } ===> ret = obj[expr]; if(ret===undefined) { try { if ( typeof expr === 'string' ) { prm = expr.split('.'); } i = prm.length; if( i ) { ret = obj; while (ret && i--) { p = prm.shift(); ret = ret[p]; } } } catch (e) {} } return ret; }, |
.
Unrelated to these problems I notice that with the GitHub version for columns where I have specified ‘clearSearch: false’ the right hand side of the filter input field is missing but it is present with 5.0.2
MymsMan
Hello,
Thank you very much. We will look at the both problems.
Best Regards,
Hello,
Can you please download the latest build from GitHub and try?
Seems we have fixed the the problem
I will look at the second problem later this day.
Thank you very much.
Best Regards
Alas not 🙁
It fails with the exact same error message and location!
In case it makes a difference I am using the Adjacency tree model
I will see if I can reproduce with a simpler grid.
MymsMan
Hello,
This is not good.
It will be great if you can prepare a simple demo.
Just to be a sure that there is no mistake with the version from github you can download the version that we use from here
Please do not forget to clear the browser cache after replacing the new files.
As for the clearSearch – we can not reproduce the problem again.
It is working for us as expected. To remember that this setting is in searchoptions –
|
1 2 3 4 5 |
... colModel : [ {name: "some", ...,searchoptions : { clearSearch: false,... },...}, ... |
Thank you for your effort.
Best Regards
Hello,
Just for the record – the problem here was that the id column was not set. The problem is resolved when the key: true property was set in the appropriate place in colModel
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top