You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by stevied82 <st...@qubed-derivatives.com> on 2016/08/01 12:02:56 UTC

Re: Trying to sort columns in com.inmethod.grid.treegrid by clicking on column header

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org