};
},
- /** Loads the current grid structure and passes the
- * structure back to the grid to force a UI refresh.
- * This is necessary if external forces alter the structure.
+ /** Loads any grid column label changes, clears any
+ * non-visible fields from the structure, and passes
+ * the structure back to the grid to force a UI refresh.
*/
reloadStructure : function() {
- this.cells = this.structure[0].cells[0].slice();
+
+ // update our copy of the column labels
+ var _this = this;
+ dojo.forEach(
+ this.grid.structure[0].cells[0],
+ function(gcell) {
+ var cell = _this.cells.filter(
+ function(c) { return c.field == gcell.field }
+ )[0];
+ cell.name = gcell.name;
+ }
+ );
+
this.pruneInvisibleFields();
- this.structure = this.grid.structure;
this.grid.setStructure(this.structure);
},
+
// determine the visible sorting from the
// view and update our list of cells to match
refreshCells : function() {
"<th width='23%'>Auto Width</th><th width='23%'>Sort Priority</th></tr></thead>" +
"<tbody />"});
- var tDiv = dojo.create('div', {style : 'min-height: 400px;'});
+ var tDiv = dojo.create('div');
tDiv.appendChild(table);
var bDiv = dojo.create('div', {style : 'text-align:right; width:100%;',