Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartClient 6.5.1:Patch for issue with filter editor and frozen fields

    SmartClient 6.5.1 has a bug whereby you can get an error "this.frozenHeader is undefined" when showing the filter editor with frozen fields.

    This is a patch to address that issue:
    Code:
    //----------------------------------------------------------------------------
    // Isomorphic SmartClient 6.5.1 patch
    // Purpose: Fix for an error with frozen fields and showFilterEditor:true
    // 
    // Applies to SmartClient 6.5.1 builds only
    //----------------------------------------------------------------------------
    if (window.isc && isc.version.startsWith("6.5.1/")) {
    
    if (isc.ListGrid) {
    
    isc.ListGrid.addProperties({
    setBodyFieldWidths :
    function (_1) {
        this.$26a = _1;
        var _2 = _1;
        if (this.allowMismatchedHeaderBodyBorder) {
            if (isc.isAn.Array(_1)) {
                _1 = this.$310(_1.duplicate());
            }
        }
        var _3 = this.frozenFields;
        if (_3) {
            var _4 = this.getFrozenSlots(_1);
            _1 = this.getUnfrozenSlots(_1);
            this.frozenBody.setColumnWidths(_4);
            var _5 = _4.sum();
            this.frozenBody.setWidth(_5);
            this.frozenBody.$pn = _5;
            if (this.frozenHeader) this.frozenHeader.setWidth(_5);
        }
        if (this.body != null) {
            this.body.setColumnWidths(_1);
        }
        if (this.$30a) {
            var _6 = this.$286.getItems(), _7 = this.getRecord(this.getEditRow()), _8 = this.getEditFormItemFieldWidths(_7);
            for (var i = 0; i < _6.length; i++) {
                var _10 = _6[i].colNum;
                if (_6[i].width != _8[_10]) {
                    _6[i].setWidth(_8[_10]);
                }
            }
        }
    }
    });
    }
    
    } else if (window.isc) {
      isc.Log.logWarn("Patch for SmartClient 6.5.1 builds included in this application. " +
                "You are currently running SmartClient verion '"+ isc.version + 
                "'. This patch is not compatible with this build and will have no effect. " +
                "It should be removed from your application source.");
    }
Working...
X