ipt2.setAttribute('type', 'checkbox');
ipt2.setAttribute('name', 'width');
- ipt3 = document.createElement('input');
+ ipt3 = document.createElement('div');
if (cell.nonSelectable) {
ipt.setAttribute('checked', 'checked');
else
this.dialogTable.appendChild(tr);
- // this must be added after its parent node is inserted into the DOM.
- var ns = new dijit.form.NumberSpinner(
- { constraints : {places : 0},
- value : cell._sort || 0,
- style : 'width:4em',
- name : 'sort'
- }, ipt3
- );
+ if ( this.grid.canSort(i+1) ) { // column index is 1-based
+
+ // must be added after its parent node is inserted into the DOM.
+ var ns = new dijit.form.NumberSpinner(
+ { constraints : {places : 0},
+ value : cell._sort || 0,
+ style : 'width:4em',
+ name : 'sort',
+ }, ipt3
+ );
+ }
}
},
var sort = dojo.query('[name=sort]', row)[0];
var cell = this.cells[i]; // index should match dialog
- if (cell._sort != sort.value) {
+ if (sort && cell._sort != sort.value) {
sortUpdated = true;
cell._sort = sort.value;
}