Sort Checkboxes with checked on top.

My first column in a grid is a checkbox.

when I click on the header for the first time, how do I get the checked rows to be on top.

I understand why its doing it, because the column is set to "false" and "false" comes before "true".

I guess what i'm askings is when you click on the header for first time, how do you get it to sort descending first, instead of ascending but only for that one column?

Thanks for your time
August 18,
No one...
August 21,
You should cancel default header click event and call sort() function explicitly -

var checkboxColumn = 1; // let's say checkbox in the second column

obj.onHeaderClicked = function(event, index){
    if (index == checkboxColumn && this.getSortColumn() != checkboxColumn) {
        this.sort(checkboxColumn, "descending");
        return true; // cancel default
Alex (ActiveWidgets)
August 21,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.