Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » how to add a new row in the filter list, if rows are already filttered.
how to add a new row in the filter list, if rows are already filttered. [message #1164066] Thu, 31 October 2013 12:09 Go to next message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Hi !

I have implemented IFilterStrategy and applying filter on table and it works fine. Now, i have a requirement to add a new row in the filter list. when i add it, as new row does not satisfy the given filtering criteria so it get's added in the main event list but does not get visible.

As filtering criteria is keeping the filter list in the persistent state and reject any other row which fails to satisfy the criteria.


How i can remove that persistence, once the filter is applied ?
(Note: i do not want to remove criteria ,as then all the rows get visible, i only wants to add a new row in the already filtered rows).

One solution in my mind is to apply the filter again after adding a new row and create another matcher which will filter only that row on the base of it's unique id, while rest of the rows will be filtered on the same previous criteria that was before adding a new row. Is it a right approach?, if there is any easy or better solution available then please suggest ?

Thanks,
SD Khan
Re: how to add a new row in the filter list, if rows are already filttered. [message #1164684 is a reply to message #1164066] Thu, 31 October 2013 21:23 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2683
Registered: July 2012
Senior Member
Hi,

AFAIK the FilterList caches which rows are not filtered. On adding a row the FilterList seems to not get informed and does not update the cached Matcher result.

So I suppose you need to reapply the filter or perform an update on the Matcher to solve your use case.

Greez,
Dirk
Re: how to add a new row in the filter list, if rows are already filttered. [message #1165284 is a reply to message #1164684] Fri, 01 November 2013 07:10 Go to previous messageGo to next message
SD Khan is currently offline SD KhanFriend
Messages: 63
Registered: May 2013
Member
Yup, right. I am reapplying filter with new criteria (including the previous plus the new) and it is working great.

Thanks,
SD Khan
Re: how to add a new row in the filter list, if rows are already filttered. [message #1798616 is a reply to message #1165284] Wed, 21 November 2018 08:30 Go to previous message
Richie Martin Pasupuleti is currently offline Richie Martin PasupuletiFriend
Messages: 2
Registered: November 2018
Junior Member
HI,
I am also trying to do the same. But i am going wrong in reapplying the filter, can you please post those lines of code, where you are adding your data and reapplying the filter?
Previous Topic:How to use CellPainterDecorator class
Next Topic:Sorting on large data-set
Goto Forum:
  


Current Time: Sat May 25 13:31:07 GMT 2019

Powered by FUDForum. Page generated in 0.01421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top