0

I use the SlickGrid plugin in my app. If you haven't heard of it, it is THE go to plugin for data grid management on the client side. I've been using it for close to a year now and have implemented it in a huge number of pages inside my app. I now want to update to the latest version, which has even cooler features but which may potentially break my app. So I was wondering if there was a way to use multiple versions of the plugin on the same app for a systematic replacement of the older version, one by one, without breaking it.

I should clarify, its a single page app. So merely adding the new version and start using, won't work - will it? Does it have a no conflict mode of sorts?

Jibi Abraham
  • 4,636
  • 2
  • 31
  • 60

1 Answers1

0

I haven't tried this, but you should be able to achieve this by just changing the SlickGrid source files to use a different namespace.

Include the various SlickGrid source files twice, renaming the old files where necessary to avoid conflicts. In each of the old files, change the namespace declaration e.g.

Change

$.extend(true, window, {
    Slick: {
        Grid: SlickGrid
    }
});

to

$.extend(true, window, {
    Slick1: {
        Grid: SlickGrid
    }
});

Your grid instantiation then becomes:

grid = new Slick1.Grid(...
njr101
  • 9,499
  • 7
  • 39
  • 56