Opened 9 years ago
Closed 8 years ago
#15405 closed defect (patchwelcome)
Grid recreates widgets using as formatter output twice on expandable rows
Reported by: | Emilio Zegarra | Owned by: | Evan |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
we are making use of the EnhancedGrid? widget in our application. As part of the design, we have followed similar instructions as documented in http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_expand.html to create an expandable row. We further customized this to return a widget rather than a String as documented in http://dojotoolkit.org/reference-guide/1.7/dojox/grid/DataGrid.html#usage referring to the return of widgets in the formatter function.
We are actually returning a grid Widget which is populated using an ObjectStore? that retrieves its information from a RESTful store. During our performance evaluation, we noted that there were to HTTP GET calls being initiated whenever a row was expanded. This lead us to believe that the widget was getting created twice whenever the row was expanded.
I was able to put breakpoints in the formmater and noted that the following lines of code in the (dojox/grid/_Grid.js) are invoked one after the other:
updateRow: function(inRowIndex){
....
this.views.updateRow(inRowIndex);
this.scroller.rowHeightChanged(inRowIndex);
....
},
tracing these two function calls, it is noted that both of them make calls to (dojox/grid/_View.js) where the function buildRow() which recreates the row contents is invoked.
We suspect that this is the source of our problem.
Change History (2)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.
You should upgrade your code to use one of those two grids.
We will consider patches to the old DojoX Grid code though.