I would like to ask if someone has used DHTMLXGrid library https://dhtmlx.com/docs/products/dhtmlxGrid/ with Lightning Web Component. Is it compatible with Lightning Web Components or locker service forbids this? Do you have any example of setting up the library? What I have done so far is importing the library to a static resource(zip file) and doing this

import { LightningElement, track, wire } from "lwc"
import DHTMLXGrid_5_2 from "@salesforce/resourceUrl/DHTMLXGrid_5_2";
import { loadStyle, loadScript } from "lightning/platformResourceLoader";
export default class DataGrid extends LightningElement {

renderedCallback() {
      loadScript(this,DHTMLXGrid_5_2 + '/dhtmlxGrid/codebase/dhtmlxgrid.js'),

    .then(() => {

      console.log('Inside then 2');

      .catch((e) => {
        console.error("Error: " + e);

what I get always is error undefined as it always loadscript goes to catch


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.