:: Forum >>

disabling column rank

how to disable user sorting on a selected column or two?

Thank you.
warren
Thursday, October 7, 2010
btw ... I tried this code:

obj.setColumnCount(7);
obj.setHeaderText(columns);

var _sort = obj.sort;

obj.sort = function(index, direction){
if (index == 3){
return;
}
else {
_sort.call(this, index, direction);
}
}

but the grid will still sort on all columns ... what am I missing?

Thank you.
warren
Thursday, October 7, 2010
// disable sort grid
obj.onHeaderClicked = function(event, index){
if (index == 3 || index==4 || index==5){
return true; // cancels further processing
};
else{
return false;
}
}
Friday, October 8, 2010
the above code works in IE8 but disables the grid view when used with FF. thoughts? Thank you.
warren
Tuesday, October 12, 2010
Note:
remove ";" before "else"

}
else
return false;
}
}
Tuesday, October 12, 2010
Thank you. I did that. but the columns remain sortable in IE & FF. other statements? positioning? Thank you.

document.write(obj);

// disable sort grid
obj.onHeaderClicked = function(event, index){
if (index == 3 || index==4 || index==5){
return true; // cancels further processing
}
else{
return false;
}
}
warren
Thursday, October 14, 2010

This topic is archived.


Back to support forum

Forum search