+ Start a Discussion
Diego LaraDiego Lara 

Third party library (jqgrid)

Hello,

I'm trying to use the third party javascript library jqgrid (http://www.trirand.com/blog/) for show and filter records with lightning. I have installed the required resources (css/js) and have initialized it in this way:
// component side
<ltng:require styles="/resource/jqui/jquery-ui.min.css"/>
<ltng:require styles="/resource/jqgrid/css/ui.jqgrid.css"/> 
    <ltng:require scripts="/resource/jqgrid/js/jquery-2.2.4.js,/resource/jqgrid/js/i18n/grid.locale-es.js,/resource/jqgrid/src/jquery.jqGrid.js" afterScriptsLoaded="{!c.afterScriptsLoaded}"/>

// Controller side:
({afterScriptsLoaded : function(cmp, evt, helper) {
        $("#jqGrid").jqGrid({                
                viewrecords: true,
                width: 780,
                height: 250,
                rowNum: 20
            });
            // activate the toolbar searching
            
    },

but an exception halts the application when entering the constructor of the jqgrid (afterScriptsLoaded);

The error said: TypeError: this.rows is undefined

"this.rows" its found in the jquery.jqgrid.js and it works fine outside lightning. Any idea of what could be wrong?

Regards
Jasveer SinghJasveer Singh
Go to Setup select Critical Update

Deactivate:  Enable Lightning LockerService Security

Then Execute the code

Thanks & Regards
Jasveer Singh
Gopala Krishna BoddepalliGopala Krishna Boddepalli
Yes, When locker service is deactivate then jqgrid is working. but if activate then its not working. please any body can help this problem.
problem is secureDOM is Not accessing in the jqgrid plugin. in jqgrid they were trying to access like this.rows[0].cells like this. but in this not getting any rows it's coming empty.
M.sfM.sf
@Gopala Krishna Boddepalli
Any solution for to include jquery after enabling locker servide