Skip to main content



      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 04:59 Go to next message
Eclipse UserFriend
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 05:10 Go to previous messageGo to next message
Eclipse UserFriend
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 12:50 Go to previous messageGo to next message
Eclipse UserFriend
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 04:41 Go to previous messageGo to next message
Eclipse UserFriend
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 06:06 Go to previous messageGo to next message
Eclipse UserFriend
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 05:25 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 22:23:25 EDT 2025

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

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

Back to the top