Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Avoid selection of ColumnHeaders when all rows are selected
icon5.gif  Avoid selection of ColumnHeaders when all rows are selected [message #1075557] Mon, 29 July 2013 16:26 Go to next message
Geraldine von RotenFriend
Messages: 5
Registered: December 2012
Location: Zürich
Junior Member
Hi,
I am trying to find a way to avoid having the column headers selected when all rows in the table are selected. Especially when all rows are selected because the table only contains one row that is then selected automatically (because there is no way to get rid of this selection!).
The problem with the column headers being selected is a) it changes colors and b) when resizing one column, all columns are resized.
Could anyone tell me how to do this or at least where to start looking? I couldn't find any command that is triggered to do the automatic selection of the first/only row.
My table has row selection enabled, so I suppose that is why all the headers get selected :-/

Thanks,
Geraldine
Re: Avoid selection of ColumnHeaders when all rows are selected [message #1075891 is a reply to message #1075557] Tue, 30 July 2013 09:29 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hm, well what you might could try is to create a custom RowSelectionModel and override isColumnPositionSelected() to always return false. Not sure what other impact that might have. Maybe you need to implement it with more logic so no other use cases break.
Re: Avoid selection of ColumnHeaders when all rows are selected [message #1075972 is a reply to message #1075891] Tue, 30 July 2013 12:28 Go to previous message
Geraldine von RotenFriend
Messages: 5
Registered: December 2012
Location: Zürich
Junior Member
Thank you, I created a new SelectionLayer that always returns false for "isColumnPositionFullySelected". This solved the layout and the resizing problem. Since we disabled the feature to select an entire column (instead, the table is sorted when clicking on the header), I hope it won't have any negative consequences.

Cheers,
Geraldine
Previous Topic:NatTable Testing
Next Topic:Multi-Edit of Checkbox
Goto Forum:
  


Current Time: Thu Mar 28 23:08:31 GMT 2024

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

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

Back to the top