ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: pquser on July 07, 2017, 03:07:06 pm
-
Hi,
I experimented with paramQuery for the first time and have the following problem:
This code
<script>
$(function () {
var data = '[{"CashboxName":"Kasse 1"}]';
var obj = {};
obj.width = 700;
obj.height = 400;
obj.colModel = [{}]
obj.dataModel = {
dataType: "JSON",
data: data
};
$('#grid_json').pqGrid(obj);
});
</script>
<div id="grid_json"></div>
is displayed like in the attachment.
-
dataModel.dataType is used for remote requests.
There shouldn't be quotes around data.
var data = [{"CashboxName":"Kasse 1"}];
and obj.colModel = [ {dataIndx: 'CashboxName' }];