Hello,
Trirand.net and Guriddo are two different things. The only common is the jqGrd JavaScript library, but nothing more.
Unfortunately we do not have any information for trirand.net about its current status. It seems it stooped working.
What we can offer you is to upgrade to the latest jqGrid JavaScript lib according to the rules as you are existing licensed user of Guriddo jqGrid JS – i.e with 50% discount, but not upgrade to the DLL lib.
If this is ok for you, please write e-mail to: sales at guriddo dot net.
Kind Regards,
Will
Guriddo Support Team
Hello,
This is your example with our modifications.
Click on the PHP tab to see the code.
Kind Regards,
Will
Guriddo Support Team
Ken,
Our sql is different from your original. Please check it carefully.
I’m going to prepare a online example and will publish it.
Our idea is to send codes in the response and not the names.
Do this like in your code you will need to change your setSelect to select only the names and not the id. (if you want your search to work)
Please set debug to true and see what is happen.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the update. Now it is imported successfully.
I have used your script and with the following changes it is working as per your requirement:
1 2 3 4 5 6 7 8 9 10 11 12 |
$grid->SelectCommand = " select m.ID, m.CustomerFullName, m.Status from tblMain m, tblCustomers c, tblStatus s where m.CustomerFullName = c.CustomerFullNameID and m.Status = s.StatusID"; ... $grid->setSelect("CustomerFullName","SELECT CustomerFullNameID, CustomerFullName from tblCustomers order by 2", true, true, true, array(""=>"")); $grid->setSelect("Status","SELECT StatusID, Status from tblStatus order by 2", true, true, true, array(""=>"")); |
We have tested it and the searching is working.
Kind Regards,
Will
Guriddo Support Team
Hello,
I want to check what you have posted, but when I try to insert the sql in the phpmyadmin I have errors.
Can you please check what you have posted for the SQL script.
The best test is to create temporary database and try to import the sql in it.
Kind Regards,
Will
Guriddo Support Team
Hello,
At first look this to work is needed to modify your SQL like this
1 2 3 4 5 6 7 8 9 |
$grid->SelectCommand = " select m.ID, c.CustomerFullNameID, s.StatusID from tblMain m, tblCustomers c, tblStatus s where m.CustomerFullName = c.CustomerFullNameID and m.Status = s.StatusID"; |
And activate the formatter option in setSelect
1 2 |
$grid->setSelect("CustomerFullName","SELECT CustomerFullNameID, CustomerFullName from tblCustomers order by 2", true, true, true, array(""=>"")); $grid->setSelect("Status","SELECT StatusID, Status from tblStatus order by 2", true, true, true, array(""=>"")); |
This way you can use the normal select for search on index.
Kind Regards,
Will
Guriddo Support Team
Hello,
We apologize for this. This is due to the recent changes in WordPress and the plugins used.
For now you can mark Paste as Text and then select the pasted code and use code from Format menu.
We will try to find better syntax highlighter.
Thank you for attention on this problem.
Kind Regards,
Will
Guriddo Support Team
Hello,
If I correctly undersatnd the requierment you can try with this CSS setting.
1 2 3 4 5 |
.ui-state-highlight > .jqgrid-rownum{color: white !important} |
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the test case. It is much easier to solve this way the problem.
The problem appear in subGridBeforeExpandRow which triggers a click which actually forces the expandGridRow (Catch 22)
To solve the problem use the following trick:
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 33 34 35 36 37 38 39 |
$("#grid").jqGrid({ datatype: 'local', data: myGridData, colNames: ['id','Column 1', 'Column 2'], colModel: [ { name: 'id', hidden: true, key: true}, { name: 'col1', width: 200 }, { name: 'col2', width: 200 } ], subGrid: true, height: 400, subGridBeforeExpand: function(pID, id) { if(last_expanded_row_id !== undefined) { setTimeout(function() { $("#grid").collapseSubGridRow(last_expanded_row_id); }, 50); } }, subGridRowExpanded: function (pID, id) { var childGridID = pID + "_table"; var childGridPagerID = pID + "_pager"; $('#' + pID).append('<table id=' + childGridID + '></table><div id=' + childGridPagerID + ' class=scroll></div>'); $("#" + childGridID).jqGrid({ datatype: 'local', data: mySubgrids[id], colNames: ['Col 1', 'Col 2', 'Col 3'], colModel: [ { name: 'c1', width: 100 }, { name: 'c2', width: 100 }, { name: 'c3', width: 100 } ], gridComplete : function() { setTimeout(function() { last_expanded_row_id = id;},1000); } }); } }); |
Guriddo Support Team
Hello,
Such kind of description of the problem will not help you.
In order to get quality support you will need to prepare a working test case.
You can publish it here, send it to support team or prepare online version.
Please note the phrase – working test case
Kind Regards,
Will
Guriddo Support Team
Hello Ken,
Thank you for the feedback and glad to hear that it works as expected
Kind Regards,
Will
Guriddo Support Team
Hello Ken,
I think you missed my first post that when once created the pivot grid does not make any request to the php file.
I will explain it in detail.
In your case, when you include for the first time the file leaderboard.php in the index file it creates the pivot definitions and the grid is constructed without data. After it is created it send request ONLY ONCE to get all the needed data.
When data comes to grid it is transformed and there are NO MORE REQUESTS to leaderboard.php file. The grid is now in local mode. This can be easy seen if you try to sort, do a paging and etc – no requests to the server.
Because of this in order to do search, local build should be done like in our demo. No PHP code – only JavaScript code.
Kind Regards,
Will
Guriddo Support Team
Hello,
As far as I understand you missed to bind a click to search button and use the function which we provide in our demo.
Include our function from the example in your index.php and bind a click as we do in our code. You will need just to configure the input data to meet your requirements.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
/** * Build custom search string from array of objects * @param {Array} rule_arr the array where the data and rules are * @param {String} group group logical operator of the fields * @returns {String} */ function buildCustomSearch( rule_arr, group ){ if(group === undefined) { group = "AND"; } var ruleGroup = ""; if(Array.isArray(rule_arr) && rule_arr.length) { ruleGroup = "{\"groupOp\":\"" + group + "\",\"rules\":["; var gi=0; $.each(rule_arr,function(i,n){ if (gi > 0) {ruleGroup += ",";} ruleGroup += "{\"field\":\"" + n.name + "\","; ruleGroup += "\"op\":\"" + n.oper + "\","; ruleGroup += "\"data\":\"" + n.val.replace(/\\/g,'\\\\').replace(/\"/g,'\\"') + "\"}"; gi++; }); ruleGroup += "]}"; } return ruleGroup; } var grid = $("#jqGrid"); // rplace with your id $("#do_search").on('click',function(){ var my_fld=[]; /* *opts : ['eq','ne', 'lt', 'le', 'gt', 'ge', 'nu', 'nn', 'in', 'ni','bw', 'bn', 'ew', 'en', 'cn', 'nc'], */ /* my_fld.push({ name: "OrderDate", val : $("#from_date").val(), oper:"ge" }); my_fld.push({ name: "OrderDate", val : $("#to_date").val(), oper:"le" }); */ // configure my_fld in a way above to meet your needs var rule = buildCustomSearch( my_fld, "AND"); grid.setGridParam({postData:{filters:rule}, search:true}).trigger("reloadGrid"); }); |
Regards,
Will
Guriddo Support Team
Hello Ken,
Please check this demo example
If you have questions or something is not clear, please let us know.
Kind Regards,
Will
Guriddo Support Team
Hello Ken,
Yes this is possible.
You need to know that after the pivot grid is build, it stay in local mode and no request to server is possible.
In order to achieve this it is needed to build the filters string manually and pass it to postData which should do the job.
In the next days we will post a example how to do this. We think it will be useful to have such method.
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top