Hi Will,
sorry for my late reply but I am just back from my Easter vacation….
So, first of all, here is the json data I receive for the grid:
[{“qbn”:”2016_0002″,”svt”:””,”lgin”:null,”req”:”Abramova”,”tgr”:”xxxxx-xxxxx”,”tgrbz”:”xxxxx-xxxxx”,”des”:”(new buildin check functionality or function”}]
…and my grid definition loos like this:
cmTemplate = {
editable: false,
sorttype:’string’,
searchoptions: {
sopt:[‘cn’],
clearSearch: false
}
};
obj = {
url: “./tools/tasks_api.php”,
postData: {
routine : “listsvt”,
qblan: $globlan
},
contentType: “application/json”,
datatype: “json”,
jsonReader: {
id: “id”,
repeatitems: false
},
mtype: “POST”,
colNames: [
localTranslation[“qbn”][$globlan],
localTranslation[“svt”][$globlan],
localTranslation[“ireq”][$globlan],
localTranslation[“imat”][$globlan],
localTranslation[“imatname”][$globlan],
“”,
“”
],
colModel: [
{
name: “qbn”,
width: 100,
template: cmTemplate
},
{
name: “svt”,
width: 170 ,
template: cmTemplate,
editable: true,
edittype:’select’,
editoptions:
{
size: “1”,
value:
{
<?php
$query = ”
SELECT
LOGIN,
CONCAT(NACHNAME, ‘, ‘, VORNAME) AS NAME
FROM
qb_user
WHERE
USR & 448 > 0
ORDER BY
NACHNAME
“;
$stmt = $db->query($query);
$selopt = “”:”,”;
while($row = $stmt->fetch(PDO::FETCH_NUM)) {
$selopt.=”‘”.$row[0].”‘:'”.addslashes($row[1]).”‘,”;
}
echo trim($selopt, “,”);
?>
},
dataInit: function(elem) {
$(elem).width(150);
}
},
},
{
name: “req”,
width: 170,
template: cmTemplate
},
{
name: “tgr”,
width: 170,
template: cmTemplate
},
{
name: “tgrbz”,
width: 300 ,
template: cmTemplate
},
{
name: “des”,
width: 25,
template: cmTemplate,
search: false,
formatter: ToolTipCellFormatter,
align: “center”
},
{
name: “lgin”,
template: cmTemplate,
hidden: true
},
],
regional: $globlan,
storeNavOptions: true,
loadonce: true,
pager: “#pager”,
height: 200,
rowNum: 100,
rownumbers:true,
sortname: “qbn”,
sortorder: “asc”,
viewrecords: true,
pgbuttons: false,
pginput: false,
rowList: [],
hoverrows: false,
gridview: true,
autoencode: true,
ignoreCase:true,
loadui: “block”,
onRightClickRow: function (rowid, iRow, iCol, e) {
$deluser = $(“#list”).jqGrid(‘getRowData’,$(“#list”).jqGrid(‘getGridParam’,’selrow’));
window.sessionStorage.setItem(“qb”, $deluser[‘qbn’]);
window.location.href=”basic.php”;
},
loadComplete: function() {
$(“th[role=’columnheader’]”)
.unbind(“mouseenter”)
.unbind(“mouseleave”);
$(“.ui-separator”).remove();
},
gridComplete: function(data) {
custbtns();
},
editurl: “./tools/tasks_api.php”
};
The ToolTipFormatter is not the issue, when I just return an empty string I still get the error message….
I hope this code sniplet is fine for you, otherwise please send me your pm and I can send you the complete file for analysis.
But just to finish:
If I run the setRegional on the grid with just this line of data I get the following error message from FireFox:
Syntax error: missing ) in parenthetical
window.jqGridUtils.parse/<()
window.jqGridUtils.parse()
.loadState()
.setRegional()
….hope this helps
Juergen