Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How we can undo changes in Nattable like we did in excel?(is it possible to undo changes in nattable?)
How we can undo changes in Nattable like we did in excel? [message #1847882] Thu, 11 November 2021 07:02 Go to next message
Prashant Pawar is currently offline Prashant PawarFriend
Messages: 13
Registered: November 2021
Junior Member
If i have changed value of any cell(Value "abc" to "xyz"), i want earlier value ("abc").

is it possible to implement this in nattable.
Re: How we can undo changes in Nattable like we did in excel? [message #1847884 is a reply to message #1847882] Thu, 11 November 2021 07:37 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
This can be done by using the DataChangeLayer. You can find details in the 1.6 New & Noteworthy - Tracking of data changes
Re: How we can undo changes in Nattable like we did in excel? [message #1847945 is a reply to message #1847884] Mon, 15 November 2021 06:55 Go to previous messageGo to next message
Prashant Pawar is currently offline Prashant PawarFriend
Messages: 13
Registered: November 2021
Junior Member
Thanks Dirk, yeah its working.
But is possible to undo changes step by step ,
because now if I changed multiple values and did undo changes so its changing all values to its original ,not step by step like we are doing in excel .
Re: How we can undo changes in Nattable like we did in excel? [message #1847947 is a reply to message #1847945] Mon, 15 November 2021 07:17 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
That is not supported as of now when looking into the code. But should be possible to implement as the DataChangeLayer exposes the tracked data changes. So you could implement your own command and handler to try to add that.
Re: How we can undo changes in Nattable like we did in excel? [message #1847982 is a reply to message #1847947] Tue, 16 November 2021 06:31 Go to previous messageGo to next message
Prashant Pawar is currently offline Prashant PawarFriend
Messages: 13
Registered: November 2021
Junior Member
Thanks Dirk,
As I am new in nattable so can you please tell me how we can achieve this , means not in details but as overview which are the handler, command needs to be implemented.

Re: How we can undo changes in Nattable like we did in excel? [message #1847986 is a reply to message #1847982] Tue, 16 November 2021 08:04 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
well you need to implement a custom command and a corresponding command handler. Have a look at the DiscardValuesCommand and the DiscardValuesCommandHandler to get an example (or anything else in NatTable)
Re: How we can undo changes in Nattable like we did in excel? [message #1847989 is a reply to message #1847986] Tue, 16 November 2021 11:00 Go to previous messageGo to next message
Prashant Pawar is currently offline Prashant PawarFriend
Messages: 13
Registered: November 2021
Junior Member
Not found DiscardValuesCommand and DiscardValuesCommandHandler.
or I need to check DiscardDataChangesCommand and DiscardDataChangesCommandHandler?
and need to implement same in custom Command and handler ?
Re: How we can undo changes in Nattable like we did in excel? [message #1847990 is a reply to message #1847989] Tue, 16 November 2021 11:08 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
Yah I meant those. Sorry

Well you need to kind of implement the same in your custom command and handler, as you only want to undo a single change.
Re: How we can undo changes in Nattable like we did in excel? [message #1847999 is a reply to message #1847990] Wed, 17 November 2021 07:48 Go to previous messageGo to next message
Prashant Pawar is currently offline Prashant PawarFriend
Messages: 13
Registered: November 2021
Junior Member
I am unable to implement DataChangeLayer because of super call (please find attachment)

I want to override clearDataChanges method of DataChangeHandler(PersistenceUpdateDataChangeHandler is extending DataChangeHandler ) so need to implement DataChangeLayer so how we can achieve that ?

I have created CustomPersistenceUpdateDataChangeHandler (extending PersistenceUpdateDataChangeHandler ) so I can write my logic there, because now changedColumns changedRows will get clear but I want it should clear one by one.
Re: How we can undo changes in Nattable like we did in excel? [message #1848006 is a reply to message #1847999] Wed, 17 November 2021 11:10 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
Sorry I don't get your point and why you want to override clearDataChanges. You simply have to implement a command handler that is undoing a single change.

Actually your questions are beyond the scope I am willing to provide for free. If you want to contribute this feature to the project, open a ticket and we can discuss there. If it is for a commercial product you are paid for, you should ask for professional support. I offer consulting services around NatTable.
Previous Topic:How we can apply filter by color on Nattable like we did in excel?
Next Topic:NatTable 2.0.2 released
Goto Forum:
  


Current Time: Tue Apr 23 09:51:20 GMT 2024

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

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

Back to the top