I've implemented my custom column sorter which is used to sort the
elements in my table.

<code>
    class FileColumnSorter extends SortableGrid.ColumnSorter
    {
        @Override
        public void onSortColumn(SortableGrid sortableGrid,
TableModelHelper.ColumnSortList columnSortList,
                                 SortableGrid.ColumnSorterCallback
columnSorterCallback)
        ....

</code>

When I initialize the FixedWidthGrid I do the following:

<code>
FixedWidthGrid dataTable = new FixedWidthGrid(rows, cols);
dataTable.setSelectionPolicy(SelectionGrid.SelectionPolicy.ONE_ROW);
dataTable.setColumnSorter(new FileColumnSorter());
</code>

The scrolltable is initialized the following way:

<code>
FixedWidthFlexTable headerTable = createHeaderTable();

// Calling the lines described above
FixedWidthGrid fileListGrid = createDataTable
(currentDescriptorList.size(), 6);

// Combine the components into a ScrollTable
scrollTable = new ScrollTable(fileListGrid, headerTable);
scrollTable.setSortPolicy(AbstractScrollTable.SortPolicy.SINGLE_CELL);
scrollTable.setColumnSortable(0, false);
scrollTable.setColumnSortable(1, true);
scrollTable.setColumnSortable(2, true);
scrollTable.setColumnSortable(3, true);
scrollTable.setColumnSortable(4, true);
scrollTable.setColumnSortable(5, false);
</code>

When I run the application, I get the built in sorting instead of my
custom sorting. I've also tried to do the following:

<code>
ColumnSorter sorter = new FileColumnSorter();
FixedWidthGrid dataTable = new FixedWidthGrid(rows, cols) {
    @Override
    public ColumnSorter getColumnSorter()
    {
        return sorter;
    }
};
</code>
To ensure that my sorter get used, but I still get the same
experience.

Any pointers on where to look?

Thanks,
Trond Andersen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to