getError not working with childItemsPath

Posted by: viethdhe130200 on 5 June 2024, 10:42 pm EST

  • Posted 5 June 2024, 10:42 pm EST

    Hi Wijmo admin,

    When I updated Wijmo FlexGrid to version 5.20241.9, there is an issue with the getError function when my table has childItemsPath. This problem occurs as seen in the second table of the demo link. Therefore, I hope you can investigate why the getError function is not working for tables with childItemsPath in this version.

    Link demo : https://jscodemine.mescius.io/sample/jIKgJKnUpE6Urjy4Nl_Ldg/

    Thank you very much.

  • Posted 6 June 2024, 5:51 am EST

    Hi,

    This query has already been answered on our other portal, here’s a copy of the response -

    A recent update in the ‘updateCell’ (internal method) seems to be causing this issue. We have forwarded this issue to the dev team for further investigation with internal tracking ID - WJM-34036. We will update you as soon as we have an update from the dev team.

    For now, to avoid this issue you can use the following workaround -

    import * as wjGrid from '@grapecity/wijmo.grid';
    
    let oldFun = wjGrid.CellFactory.prototype.updateCell
    wjGrid.CellFactory.prototype.updateCell = function (e, t, i, o, n, r) {
        oldFun.call(this, e, t, i, o, n, r);
    
        var l = e.grid, a = e.rows, u = e.columns, c = a[t], d = u[i], v = e.cellType, E = wjGrid.CellType;
        var P = l._getBindingColumn(e, t, d), Q = (0 != r && P) ? e.getCellData(t, i, !1) : null;
    
        if ((v == E.Cell || v == E.RowHeader) && l._getShowErrors()) {
            var Re = "";
            !1 === r && P && (Q = e.getCellData(t, i, !1));
            var Ee = a[t].dataItem;
            Re = P.binding && Ee && P.getIsRequired(c) && (null == Q || "" === Q) ? l._edtHdl._getRequiredMsg() : l._getError(e, t, i, !1);
            l._edtHdl._setCellError(o, Re)
        }
    }

    Please refer to the following sample for the same - https://jscodemine.mescius.io/share/25LlchinuEmXmsvoCAnNyA/

    Regards,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels