Displaying checkbox in sortable table

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Displaying checkbox in sortable table

Postby mgonjedif » Mon Jul 28, 2008 3:13 am

Hi, I am having problem in displaying checkbox in sortable table. When rendered in a SortableTable, column is rendered as text..

Looking at JIDE demo, SortableTableDemo, I would like to display checkbox in 3rd column when displayed in SortableTableModel, similar to, in case of Normal TableModel.
mgonjedif
 
Posts: 1
Joined: Mon Jul 28, 2008 2:54 am

Postby JIDE Support » Mon Jul 28, 2008 9:10 am

We used ComboBox as the boolean cell editor by default as it looks more consistent in the table as most cells are strings. If you prefer to use check box, you just need to implement getEditorContextAt method on ContextSensitiveTableModel.

Code: Select all
       
        public EditorContext getEditorContextAt(int row, int column) {
            return BooleanCheckBoxCellEditor.CONTEXT for the column that is boolean. Otherwise return null.
        }


Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 79 guests