Skip to main content



      Home
Home » Eclipse Projects » NatTable » Programmatically sorting works only when column is visible
Programmatically sorting works only when column is visible [message #1726150] Thu, 10 March 2016 02:58 Go to next message
Eclipse UserFriend
I have a Table with lots of columns. When opening my table I want to have an initial sorting of a column which is not visible.
By doing so I used the SortColumnCommand
 natTable.doCommand( new SortColumnCommand( natTable,
                               MyTableConstants.TIME_COLUMN_POSITION + 1, SortDirectionEnum.DESC ) );


This is not working unless the column is currently visible in the viewport.
Is there a way to force it?

P.S not visible != hidden
Re: Programmatically sorting works only when column is visible [message #1726153 is a reply to message #1726150] Thu, 10 March 2016 03:06 Go to previous messageGo to next message
Eclipse UserFriend
Not via command. The concept of commands is to use the position and transform it. This is to support user interactions. If you want to sort by hidden columns you will need to access the SortHeaderLayer API directly, because the command should not get to that layer as the column is hidden.
Re: Programmatically sorting works only when column is visible [message #1726167 is a reply to message #1726150] Thu, 10 March 2016 04:41 Go to previous message
Eclipse UserFriend
Hi Dirk,
thanks for your response. Using the SortHeaderLayer API worked out for me.
Previous Topic:Bug or wanted behavior: selectAll
Next Topic:Cell decoration
Goto Forum:
  


Current Time: Sun Jun 15 01:18:18 EDT 2025

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

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

Back to the top