Imad
Imad

Reputation: 7490

Object doesn't support property or method "_super" in igGrid

I have used infragistics igGrid in my application but I am getting javascript error

Object doesn't support property or method "_super"

I know this can be avoided but I want to give it fake implementation (or real answer, may be adding some missing reference) for some reasons. I tried following but not working.

var _super = function(a,s,d,f,g,h) {
}

I have wrote above code before referencing igGrid JS libraries.

In code, _super has variable number of arguments when calling it.

Upvotes: 2

Views: 310

Answers (2)

Konstantin Dinev
Konstantin Dinev

Reputation: 34905

You're probably referencing a version of jQuery UI that still doesn't have _super and _superApply implemented. Try referencing the latest version and the error should go away.

https://bugs.jqueryui.com/ticket/6861

Upvotes: 1

Ognyan Dimitrov
Ognyan Dimitrov

Reputation: 6251

If I understand correctly you are trying to use _super out of scope. You can use _super in the objects scope like this :

(function ($) {

    $.ig.RPCDataSource = $.ig.RPCDataSource || $.ig.RESTDataSource.extend({

    _processJsonResponse: function (data, context) {
            try {
               console.log('my special preprocessing');
               return this._super(data, context);
            } catch (e) {
                console.log(e.message);
                // my special error handling
            } 
        },
   });
}(jQuery));

UPDATE _super is a method from the jQuery widget factory. iG controls are built upon jQuery Widget. Therefore _super is defined in jQuery widget.

Upvotes: 1

Related Questions