Skip to main content



      Home
Home » Eclipse Projects » NatTable » Fill down function
Fill down function [message #1834730] Mon, 16 November 2020 22:35 Go to next message
Eclipse UserFriend
hello everyone:
I want to realize the function of Ctrl + D similar to excel in the table, that is to fill in the same value in the whole column or selection area. I don't know how to do it. Thank you!
Re: Fill down function [message #1834740 is a reply to message #1834730] Tue, 17 November 2020 04:00 Go to previous messageGo to next message
Eclipse UserFriend
You need to register a custom key binding and then perform the action you want. For this you need to implement a command and a corresponding commandhandler that you register with a layer (I would suggest the DataLayer as you want to change data).

dataLayer.registerCommandHandler(new MyCustomCommandHandler(this);


Typically you create a AbstractUiBindingConfiguration that you register with your NatTable instance and there add some code like this:

        @Override
        public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
            uiBindingRegistry.registerKeyBinding(
                    new KeyEventMatcher(SWT.MOD1, 's'),
                    new IKeyAction() {
                        @Override
                        public void run(NatTable natTable, KeyEvent event) {
                            natTable.doCommand(new MyCustomCommand());
                        }
                    });
        }

Re: Fill down function [message #1834901 is a reply to message #1834740] Fri, 20 November 2020 01:26 Go to previous messageGo to next message
Eclipse UserFriend
This is the first time that I use nattable. I don't know the underlying source code, so I don't know how to customize commands. Can you help me? thank you!
Re: Fill down function [message #1834902 is a reply to message #1834901] Fri, 20 November 2020 02:09 Go to previous messageGo to next message
Eclipse UserFriend
Then you need to get familiar with it. Or you pay me for doing your job or ask for a tutorial where I teach you the usage of NatTable.

Have a look at our Getting Started Tutorial: https://www.vogella.com/tutorials/NatTable/article.html
Check out our examples application: https://www.eclipse.org/nattable/documentation.php?page=examples_application

In the _814_EditableSortableGroupByWithFilterExample we for example register actions to save and discard data changes.
Re: Fill down function [message #1855779 is a reply to message #1834730] Wed, 02 November 2022 16:51 Go to previous message
Eclipse UserFriend
hello,
do you have a macro in VBA code for it?
if you don't you can search here for one and perform a convert to another language

Free Macros in Excel
Previous Topic:TextCellEditor causes a "SWT Resource was not properly disposed"
Next Topic:How to update row group header while filtering
Goto Forum:
  


Current Time: Mon May 19 18:15:54 EDT 2025

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

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

Back to the top