Changeset 12830
- Timestamp:
- 03/03/08 08:28:12 (10 months ago)
- Location:
- dojox/trunk/grid
- Files:
-
- 2 added
- 1 modified
-
tests/support/test_data_objects.js (added)
-
tests/test_grid_object_model_change.html (added)
-
_data/model.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dojox/trunk/grid/_data/model.js
r12739 r12830 257 257 } 258 258 }, 259 allChange: function(){ 260 this.notify("FieldsChange"); 261 this.inherited(arguments); 262 }, 259 263 autoAssignFields: function(){ 260 var d = this.data[0], i = 0 ;264 var d = this.data[0], i = 0, field; 261 265 for(var f in d){ 262 this.fields.get(i++).key = f; 263 } 266 field = this.fields.get(i++); 267 if (!dojo.isString(field.key)){ 268 field.key = f; 269 } 270 } 271 }, 272 setData: function(inData){ 273 this.data = (inData || []); 274 this.autoAssignFields(); 275 this.allChange(); 264 276 }, 265 277 getDatum: function(inRowIndex, inColIndex){