Disabling sorting when filter is applied or removed

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Disabling sorting when filter is applied or removed

Postby niteen22 » Tue Sep 11, 2012 4:07 am

I am using FilterableTableModel (which is wrapped by SortableTableModel) and applying and removing filters based on button click. I am fetching filterablemodel properly when filter need to be applied or removed.

model = new SortableTableModel(filterableModelInstance);

IFilterableTableModel filterModel=(IFilterableTableModel) TableModelWrapperUtils
.getActualTableModel(model ,FilterableTreeTableModel.class);

My logic is when I remove filters certain rows are displayed at the end of table. However if one of the column is in sorted state, table is refreshed and sorted again after removing the filter hence those rows are placed based on sorting state. Is there any way to avoid table sorting when filter is applied or removed to the model. I still want to enable sorting when columns are explicitly clicked

Thanks,
Nitin
niteen22
 
Posts: 12
Joined: Mon Jan 23, 2012 3:43 pm

Re: Disabling sorting when filter is applied or removed

Postby JIDE Support » Tue Sep 11, 2012 9:04 am

If you have already modified the FilterableTableModel's logic to display the new rows in the end of the table after removing filter, please invoke SortableTableModel#setSortingPaused() to avoid the SortableTableModel to sort these rows. In this case, clicking the table header could still sort the column.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Disabling sorting when filter is applied or removed

Postby niteen22 » Wed Sep 12, 2012 4:42 am

Thanks !! I will try it
niteen22
 
Posts: 12
Joined: Mon Jan 23, 2012 3:43 pm


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 9 guests

cron