Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Sort and Freeze of column(Sort does not work if column is freezed)
Sort and Freeze of column [message #1480590] Thu, 20 November 2014 09:59 Go to next message
Amruta Sardeshmukh is currently offline Amruta SardeshmukhFriend
Messages: 25
Registered: September 2014
Junior Member
Basically in my tabel I have the first column freezed by default.
I have applied the Freeze command as :

coverSheetNatTable.doCommand(new FreezeColumnCommand(bodyLayer, 0));

I have implemented sort as command on the column header ,it is working fine.

However intially the since the first column is freezed,when I try to apply sort through sort command through column header ,sort does not apply.

If I unfreeze the column(first) ,then apply sort with sort command it works.After that if I again apply freeze ,sort still works.

This means the first time ,sort does not work on freeze column.
Re: Sort and Freeze of column [message #1480607 is a reply to message #1480590] Thu, 20 November 2014 10:10 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2809
Registered: July 2012
Senior Member
AFAIK it works fine in the examples. Maybe you should think about how you execute commands. Since you are trying to do everything programmatically you might break things because of wrong usage.

Maybe calling this command will help

coverSheetNatTable.doCommand(new FreezeColumnCommand(compositeFreezeLayer, 0));


Otherwise try to debug the command execution and see why it is not further processed.
Re: Sort and Freeze of column [message #1482335 is a reply to message #1480607] Fri, 21 November 2014 17:50 Go to previous messageGo to next message
Amruta Sardeshmukh is currently offline Amruta SardeshmukhFriend
Messages: 25
Registered: September 2014
Junior Member
Applying command has not helped.

coverSheetNatTable.doCommand(new FreezeColumnCommand(compositeFreezeLayer, 0));
Re: Sort and Freeze of column [message #1485501 is a reply to message #1482335] Mon, 24 November 2014 09:41 Go to previous messageGo to next message
Amruta Sardeshmukh is currently offline Amruta SardeshmukhFriend
Messages: 25
Registered: September 2014
Junior Member
BodyLayerStack composition is :

columnGroupModel = new ColumnGroupModel();

glazedListsEventLayer = new GlazedListsEventLayer(underlyingLayer,
eventList);
columnReorderLayer = new ColumnGroupReorderLayer(glazedListsEventLayer,columnGroupModel);
columnHideShowLayer = new ColumnHideShowLayer(columnReorderLayer);
columnGroupExpandCollapseLayer = new ColumnGroupExpandCollapseLayer(columnHideShowLayer, columnGroupModel);
// Cat don't need row hide functionality;
rowHideShowLayer = new RowHideShowLayer(glazedListsEventLayer);

selectionLayer = new SelectionLayer(columnGroupExpandCollapseLayer);

viewportLayer = new ViewportLayer(selectionLayer);
freezeLayer = new FreezeLayer(selectionLayer);
compositeFreezeLayer = new CompositeFreezeLayer(freezeLayer,
viewportLayer, selectionLayer);
setUnderlyingLayer(compositeFreezeLayer);




Could setUnderlyingLayer(compositeFreezeLayer); be causing the issue.
Re: Sort and Freeze of column [message #1485582 is a reply to message #1485501] Mon, 24 November 2014 11:06 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2809
Registered: July 2012
Senior Member
Are you calling the FreezeColumnCommand before or after natTable.configure()?

If you are calling it before it won't work because NatTable is in an undefined state.
Re: Sort and Freeze of column [message #1490666 is a reply to message #1485582] Fri, 28 November 2014 10:25 Go to previous message
Amruta Sardeshmukh is currently offline Amruta SardeshmukhFriend
Messages: 25
Registered: September 2014
Junior Member
Its working fine now
Thanks!
Previous Topic:Is ctrl+c and ctrl+v supprted on the nattabel cells
Next Topic:different Colors in one Cell
Goto Forum:
  


Current Time: Sun Apr 11 21:13:45 GMT 2021

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

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

Back to the top