Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Disable filter on specific columns
Disable filter on specific columns [message #1065851] Thu, 27 June 2013 15:16 Go to next message
Testr t is currently offline Testr t
Messages: 82
Registered: April 2013
Member
Hi,

How can I disable filtering on specific columns. When I add NullComparator for a column based on the Label with FilterRowConfigAttributes.FILTER_COMPARATOR, it still allows me to enter filter text and do the filter. Is there a way I can disable the filter cell on a specific column?
Re: Disable filter on specific columns [message #1065895 is a reply to message #1065851] Fri, 28 June 2013 03:49 Go to previous message
Alex Kipling is currently offline Alex Kipling
Messages: 246
Registered: July 2012
Senior Member
You can make the needed field "NEVER_EDITABLE".
Use the FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + column labels for that.

            labelFilterColumn = getLabelForColumn(3);
            
            // Make cells editable
            configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.NEVER_EDITABLE, NORMAL,
                    labelFilterColumn);
        }
    }


    // PRIVATE
    private String getLabelForColumn(int column) {
        return FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + column;
    }

[Updated on: Fri, 28 June 2013 03:50]

Report message to a moderator

Previous Topic:How to add own CellPainters and Editors to the FilterRowHeaderComposite?
Next Topic:RowHeaderLayer configuration not reflecting.
Goto Forum:
  


Current Time: Fri Apr 18 16:54:03 EDT 2014

Powered by FUDForum. Page generated in 0.01890 seconds