Hey guys, I have a very specific page where I need to disable/enable sorting
for a single-column grid - the grid is under a small form, and based on the
form input I need to disable or enable the sorting.

So I thought of the standard way of doing this - in the
onSuccessFromFormFilter handler I do the following:

if(/*condition to disable the sorting*/)
{
  // other code....

  // disable sorting
  PropertyModel nameColumn = gridResources.getDataModel().getById("name");
  nameColumn.sortable(false);
}

This is something that worked nicely when I was using BeanModel to add
custom columns to grid (in older versions of Tapestry5 when there was no
"add" attribute). But now, it just does nothing and the column remains
sortable. The name column is an automatically added column extracted from
the POJO - I'm not adding it using "add". I know the code in my onSuccess
handler works, as I also do gridResources.getSortModel().clear(); to reset
existing sorting - and that works.

Any ideas why it just does nothing? Am I doing something stupid here? :)

Thanks,
Rado
-- 
View this message in context: 
http://www.nabble.com/T5%3A-disabling-column-sorting-programmatically-in-Grid-tp21546541p21546541.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to