Is it possible to use widgets with different versions of dgrid?

748
2
05-24-2017 06:41 PM
JoeJoyce
New Contributor II

I have several widgets that were using dgrid1 with dstore but the Attribute Table widget uses dgrid and dojo/store. It seems there can be a conflict with the two versions. When I open the Attribute Table widget, the grid data in my other open widgets using dgrid1 gets cleared. The rows just get deleted. And sometimes I'll see errors related to Store mixin in the console. It seems when the dgrid script for the attribute table is loaded it overrides the script functions and names for dgrid1 globally. But maybe I'm just doing something wrong. Is it possible to have both versions of dgrid referenced by separate widgets in the same app or do I have to downgrade my widgets to use dgrid and dojo/store in order to use Attribute Table? If not, is there a plan to migrate the Attribute Table widget to dgrid1 in the near future?

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Joe,

  I have never run into this situation because I am not using dgrid1 or dStore in my widgets, but the question arises what features specific to dgrid1 are you needing in your widget? I have found that many times developers use something because it is the easiest or the latest thing but they really do not need it (like people including jQuery just so they can use $ to find a dom node or do a style change). Most of the time I just use the jimu SimpleTable as this is very light weight html table based dijit with no bloat if I don't need something specific to dgrid.

0 Kudos
JoeJoyce
New Contributor II

I need editable grids and could not find the Editor mixin for dgrid while dgrid1/Editor did exist. But I see in dgrid documentation now that it was only converted to a mixin in 0.4. So I think I should be able to use the old dgrid with the old editor now.