One solution I did find was to override the onSortStateChanged() method of
AbstractGrid to fetch the new updated TreeModel from my DAO with the new
sort state applied - then call setModelObject() and invalidateAll() to force
the grid to be redrawn.. it seems to work but not sure how clean this is?

Any better suggestions

@SuppressWarnings("deprecation")
@Override
protected void onSortStateChanged(AjaxRequestTarget target) 
{
        getTree().setModelObject(getSortedTreeModel(this.getSortState()));
                
        getTree().invalidateAll();
                
        super.onSortStateChanged(target);

}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Trying-to-sort-columns-in-com-inmethod-grid-treegrid-by-clicking-on-column-header-tp4675237p4675245.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to