Yogi66

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: setRegional issue #125049
    Yogi66
    Participant

    Done…. I just send you the file.

    If you need more data please let me know…

    Juergen

    in reply to: setRegional issue #125041
    Yogi66
    Participant

    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

    in reply to: SubGrid Issues #124333
    Yogi66
    Participant

    Hi Will,

    I assume you refer to the “reloadOnExpand” option? – No, this did not change the behaviour.

    Anyhow, I spent two day now in investiagting the issue but could not solve it so I went back to the initial solution to cycle through all rows.

    Doing this I found out that the double event I am struggeling with is not the one from the collapsing / expanding, it is more that the complete grid reloads twice after adding a new data set so I have to find out why.

    Just to give you a hint what I am trying to do:

    I want to add a new row in the main table and after saving it I want to select the new row, open the subgrid and trigger the form edit on the subgrid. This is all working fine besides that the new row is selected correctly but shortly afterwards again deselected (exactly then when the second gridComplete event is triggered)

    Anyhow, thanks for your support

    Juergen

Viewing 3 replies - 1 through 3 (of 3 total)

Stay connected with us in your favorite flavor!