Page 1 of 1

A custom cell editor for FilterEditor

PostPosted: Wed Dec 20, 2017 1:28 pm
by johnit
I use a standard FilterEditor for a text column. It works great but I want to show a combobox instead of a simple text field. The combobos should contain data from a custom databook.

How can I set a custom combobox?

Re: A custom cell editor for FilterEditor

PostPosted: Wed Dec 20, 2017 1:33 pm
by Support@SIB
This isn't a big problem, simply set the cell editor:

Code: Select all
filterEditor.setCellEditor(cellEditorCustom);

and create a simple linked cell editor:

Code: Select all
cellEditorCustom = new UILinkedCellEditor(new ReferenceDefinition(
             new String[] {FilterEditor.SEARCH}, rdbData, new String[] { "COLUMNNAME" })))

The column name FilterEditor.SEARCH is important, because the FilterEditor reads the value from the search column and creates a condition for the right column.