ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: STEVE on July 10, 2022, 07:08:55 am
-
Dear paramvir,
I was tring to make a tree grid from the demo with modifying some code related to the datamodel.
I have done everything I can do for fixing the problem of the empty page without error messages.
Error log show me that parameter wrong ie, VirtualProtect() failed [87]
Please help me to reslove this problem.
I have some sample data as below. It is from the remote database with the php.
And I am going to attach the source codes. Please check it.
For your Information about parent-child relationship : fid is child, fidp is parent.
Best Regards,
Steve.
{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98","seq":"S0001","ocd":"SPO","scd":"BA1","lvl":"1","fid":"PXXX","ep":"","fidp":"","id":"ID0000000001"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uacb0\uc81c\ub0b4\uc5ed \uc2e4\uc2dc\uac04 \uc54c\ub9bc\uccb4\uacc4","seq":"S0002","ocd":"SPO","scd":"BA1","lvl":"2","fid":"PXXX01","ep":"","fidp":"PXXX","id":"ID0000000002"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc54c\ub9bc \uc11c\ube44\uc2a4","seq":"S0003","ocd":"SPO","scd":"BA1","lvl":"3","fid":"PXXX0101","ep":"","fidp":"PXXX01","id":"ID0000000003"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc2e0\uccad \uc548\ub0b4","seq":"S0004","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX010101","ep":"","fidp":"PXXX0101","id":"ID0000000004"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc2e0\uccad \uc548\ub0b4 \ub4f1\ub85d","seq":"S0005","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010101","ep":"Y","fidp":"PXXX010101","id":"ID0000000005"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc2e0\uccad \uc548\ub0b4 \uc218\uc815","seq":"S0006","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010102","ep":"Y","fidp":"PXXX010101","id":"ID0000000006"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc2e0\uccad \uc548\ub0b4 \uc870\ud68c","seq":"S0007","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010103","ep":"Y","fidp":"PXXX010101","id":"ID0000000007"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc2e0\uccad \uc548\ub0b4 \uc0ad\uc81c","seq":"S0008","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010104","ep":"Y","fidp":"PXXX010101","id":"ID0000000008"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc218\uae09\uc790\uaca9 \ud655\uc815","seq":"S0009","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX010102","ep":"","fidp":"PXXX0101","id":"ID0000000009"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc218\uae09\uc790\uaca9 \uc870\ud68c","seq":"S0010","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010201","ep":"Y","fidp":"PXXX010102","id":"ID0000000010"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc218\uae09\uc790\uaca9 \ud655\uc815","seq":"S0011","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010202","ep":"Y","fidp":"PXXX010102","id":"ID0000000011"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc218\uae09\uc790\uaca9 \ucde8\uc18c","seq":"S0012","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01010203","ep":"Y","fidp":"PXXX010102","id":"ID0000000012"},{"fnm":"\uba54\uc2dc\uc9c0 \uc11c\ubc84 \uc5f0\uacc4","seq":"S0013","ocd":"SPO","scd":"BA1","lvl":"3","fid":"PXXX0102","ep":"","fidp":"PXXX01","id":"ID0000000013"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uad00\ub9ac","seq":"S0014","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX010201","ep":"","fidp":"PXXX0102","id":"ID0000000014"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \ub4f1\ub85d","seq":"S0015","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020101","ep":"Y","fidp":"PXXX010201","id":"ID0000000015"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uc870\ud68c","seq":"S0016","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020102","ep":"Y","fidp":"PXXX010201","id":"ID0000000016"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uc218\uc815","seq":"S0017","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020103","ep":"Y","fidp":"PXXX010201","id":"ID0000000017"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uc0ad\uc81c","seq":"S0018","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020104","ep":"Y","fidp":"PXXX010201","id":"ID0000000018"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \ubc1c\uc1a1\uc11c\ubc84 \uc5f0\uacc4","seq":"S0019","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX010202","ep":"","fidp":"PXXX0102","id":"ID0000000019"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uc1a1\uc2e0","seq":"S0020","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020201","ep":"Y","fidp":"PXXX010202","id":"ID0000000020"},{"fnm":"\ubaa8\ubc14\uc77c \uc54c\ub9bc \uc11c\ube44\uc2a4 \uc218\uc2e0","seq":"S0021","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01020202","ep":"Y","fidp":"PXXX010202","id":"ID0000000021"},{"fnm":"\uc54c\ub9bc \uba54\uc2dc\uc9c0 \ubc1c\uc1a1","seq":"S0022","ocd":"SPO","scd":"BA1","lvl":"3","fid":"PXXX0103","ep":"","fidp":"PXXX01","id":"ID0000000022"},{"fnm":"\uc54c\ub9bc\uba54\uc2dc\uc9c0 \ud1b5\ud569\ubc1c\uc1a1 \uad00\ub9ac","seq":"S0023","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX010301","ep":"","fidp":"PXXX0103","id":"ID0000000023"},{"fnm":"\uc54c\ub9bc\uba54\uc2dc\uc9c0 \ub2e8\uac74\ubc1c\uc1a1","seq":"S0024","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030101","ep":"Y","fidp":"PXXX010301","id":"ID0000000024"},{"fnm":"\uc54c\ub9bc\uba54\uc2dc\uc9c0 \ub300\ub7c9\ubc1c\uc1a1","seq":"S0025","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030102","ep":"Y","fidp":"PXXX010301","id":"ID0000000025"},{"fnm":"\uc54c\ub9bc\uba54\uc9c0\uc2dc \uc7ac\ubc1c\uc1a1","seq":"S0026","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030103","ep":"Y","fidp":"PXXX010301","id":"ID0000000026"},{"fnm":"\ubc1c\uc1a1 \uc815\uc0b0 \uc2b9\uc778","seq":"S0027","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030104","ep":"Y","fidp":"PXXX010301","id":"ID0000000027"},{"fnm":"\ubc1c\uc1a1 \uc815\uc0b0 \ub8f0 \uc801\uc6a9","seq":"S0028","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030105","ep":"Y","fidp":"PXXX010301","id":"ID0000000028"},{"fnm":"\uc54c\ub9bc\uba54\uc2dc\uc9c0 \uc7ac\ubc1c\uc1a1","seq":"S0029","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX01030106","ep":"Y","fidp":"PXXX010301","id":"ID0000000029"},{"fnm":"\uc804\uc790\ubc14\uc6b0\ucc98 \uc6b4\uc601\uad00\ub9ac","seq":"S0030","ocd":"SPO","scd":"BA1","lvl":"2","fid":"PXXX02","ep":"","fidp":"PXXX","id":"ID0000000030"},{"fnm":"\ubc14\uc6b0\ucc98\uad00\ub9ac","seq":"S0031","ocd":"SPO","scd":"BA1","lvl":"3","fid":"PXXX0201","ep":"","fidp":"PXXX02","id":"ID0000000031"},{"fnm":"\ubc14\uc6b0\ucc98\uc0dd\uc131\uad00\ub9ac","seq":"S0032","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX020101","ep":"","fidp":"PXXX0201","id":"ID0000000032"},{"fnm":"\ubc14\uc6b0\ucc98 \ub4f1\ub85d","seq":"S0033","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010101","ep":"Y","fidp":"PXXX020101","id":"ID0000000033"},{"fnm":"\ubc14\uc6b0\ucc98 \uc218\uc815","seq":"S0034","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010102","ep":"Y","fidp":"PXXX020101","id":"ID0000000034"},{"fnm":"\ubc14\uc6b0\ucc98 \uc870\ud68c","seq":"S0035","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010103","ep":"Y","fidp":"PXXX020101","id":"ID0000000035"},{"fnm":"\ubc14\uc6b0\ucc98 \uc0ad\uc81c","seq":"S0036","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010104","ep":"Y","fidp":"PXXX020101","id":"ID0000000036"},{"fnm":"\ubd80\uc815\uc0ac\uc6a9\uad00\ub9ac","seq":"S0037","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX020102","ep":"","fidp":"PXXX0201","id":"ID0000000037"},{"fnm":"\ubd80\uc815\uc0ac\uc6a9\uc0ac\ub840 \uc870\ud68c","seq":"S0038","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010201","ep":"Y","fidp":"PXXX020102","id":"ID0000000038"},{"fnm":"\ubd80\uc815\uc0ac\uc6a9\uc0ac\uc6a9\uc790 \ub4f1\ub85d","seq":"S0039","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010202","ep":"Y","fidp":"PXXX020102","id":"ID0000000039"},{"fnm":"\ubd80\uc815\uc0ac\uc6a9\uc0ac\uc6a9\uc790 \uc870\ud68c","seq":"S0040","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010203","ep":"Y","fidp":"PXXX020102","id":"ID0000000040"},{"fnm":"\ubd80\uc815\uc0ac\uc6a9\uc0ac\uc6a9\uc790 \ucde8\uc18c","seq":"S0041","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02010204","ep":"Y","fidp":"PXXX020102","id":"ID0000000041"},{"fnm":"\ub9e4\ucd9c \ubc0f \uc815\uc0b0","seq":"S0042","ocd":"SPO","scd":"BA1","lvl":"3","fid":"PXXX0202","ep":"","fidp":"PXXX02","id":"ID0000000042"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed\uad00\ub9ac","seq":"S0043","ocd":"SPO","scd":"BA1","lvl":"4","fid":"PXXX020201","ep":"","fidp":"PXXX0202","id":"ID0000000043"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \uc870\ud68c","seq":"S0044","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020101","ep":"Y","fidp":"PXXX020201","id":"ID0000000044"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \uc218\uc815","seq":"S0045","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020102","ep":"Y","fidp":"PXXX020201","id":"ID0000000045"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \uc0ad\uc81c","seq":"S0046","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020103","ep":"Y","fidp":"PXXX020201","id":"ID0000000046"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST","seq":"S0047","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020104","ep":"Y","fidp":"PXXX020201","id":"ID0000000047"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST2","seq":"S0048","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020105","ep":"Y","fidp":"PXXX020201","id":"ID0000000048"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST3","seq":"S0049","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020106","ep":"Y","fidp":"PXXX020201","id":"ID0000000049"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST4","seq":"S0050","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020107","ep":"Y","fidp":"PXXX020201","id":"ID0000000050"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST5","seq":"S0051","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020108","ep":"Y","fidp":"PXXX020201","id":"ID0000000051"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST6","seq":"S0052","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020109","ep":"Y","fidp":"PXXX020201","id":"ID0000000052"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST7","seq":"S0053","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020110","ep":"Y","fidp":"PXXX020201","id":"ID0000000053"},{"fnm":"\uacb0\uc81c\ub0b4\uc5ed \ubd84\uc11d TEST8","seq":"S0054","ocd":"SPO","scd":"BA1","lvl":"5","fid":"PXXX02020111","ep":"Y","fidp":"PXXX020201","id":"ID0000000054"}]}
-
It's your environment specific issue.
Please use xdebug to debug your code and find out which line is causing the error.
-
Dear paramvir,
I am using PHP debuger. But There is no error. Only I can the error in the error.log file from apache.
I am going to ask you about what childstr is and parentId is. I can't understand how treegrid works from your demos.
Example of flat data: Flat data is just like normal data format of the grid; children nodes specify the parent as parentId property.
var data = [
{ id: 1, name: "C", size: "", date: "05/13/2008" },
{ id: 2, name: "Program Files", size: "9047", date: "03/26/2015", parentId: 1 },
{ id: 21, name: "Apache", size: "", date: "01/16/2010", parentId: 2 }
];
I think two nodes of child and parent should be coded in the treeModel. But there is only one node for the treegrid.
i.e, dataIndx: 'fnm',
I think it is for the nested datamodel. I need the flat data model for the treegrid.
treeModel: {
dataIndx: 'fnm',
checkbox: false,
cascade: true,
icons: false,
summary: false,
historyMove: true, //7.4
leafIfEmpty: true //7.4
Would you post the example for the flat data example php file?
Best regards,
Steve
-
id is the name of field which stores unique id of the current node and parentId is the name of field that stores id of its parent.
This one is the example of treegrid with flat data.
https://paramquery.com/pro/demos/treegrid-lazy
treeModel: {
dataIndx: 'fullname',
id: 'EmployeeID',
parentId: 'ReportsTo'
-
Thank you for your kindness. It works.
It works now after changing other codes like below. But Is not understandable.
As far as I know, To do batch editing, the codes are needed.
dataModel: {
dataType: "JSON",
location: 'remote',
// getData: function(response){ <--- I commented these lines
// return {data: response}; <---
// }, <---
url: "treedb.php",
recIndx: 'id'
-
I found that it couldn't update the database at all.
only retrieve again.
-
I am uploading the problem files. Please check it.
-
Please help me to resolve this problem. It can't update the database.
dataModel: {
dataType: "JSON",
location: "remote",
recIndx: "id",
url: "treedb.php"
//,
//getData: function(response){ '''' if I uncomment these lines, Nothing shown on the page.
// return {data: response};
}
},
-
Would you give me the best example of the tree grid batch editing?
-
Hello ~ paramvir ~
Please help me...
I can't fix this problem.
Please....
-
Dear Steve
Sorry for the delay, I would share the PHP script for ( treegrid + batch editing ) in few days.
-
Dear paramvir
I have been waiting for your solution to my question every day.
-
Dear paramvir
Please Help me.
-
Dear Steve
v8.5.0 would be released shortly with support for remote batch editing ( with PHP script ) in treegrid.
https://paramquery.com/pro/demos/editing_tree
-
Dear paramvir
Would you guide me on how to use it? Probably, there are some rules to keep.
It is supposed to work. It must be my fault.
-
Please follow these steps:
1. Upgrade to v8.5.0 and ensure to refresh your browsers' cache.
2. Get javascript code from https://paramquery.com/pro/demos/editing_tree
3. Get PHP code from https://paramquery.com/pro/demos/editing_tree
-
I am sorry to say that it didn't work at all.
-
What issue/ error are you facing?
-
I am waiting