Problem with checkbox selection model in editable grid panel

109 views
Skip to first unread message

stwr

unread,
Aug 12, 2013, 4:59:36 AM8/12/13
to gwt...@googlegroups.com
Hi All,

my editable grid panel (EditorGridPanel editorGridPanel) uses following selection model:

        private CheckboxSelectionModel selectionModel;
    ...
    selectionModel = new CheckboxSelectionModel();
    editorGridPanel.setSelectionModel(selectionModel);


In addition the selectionModel is contained in editorGridPanel's column config to get it displayed:

        final CheckboxColumnConfig cbColumnConfig = new CheckboxColumnConfig(selectionModel);
    ...
    final BaseColumnConfig[] columnConfig = new BaseColumnConfig[]{
        cbColumnConfig, ... };

    ColumnModel columnModel = new ColumnModel(columnConfig);
    editorGridPanel.setColumnModel(columnModel);


The other columns in my grid panel are editable text fields and combo boxes.

My problem is described by following use case:

1. The user selects check box for the first row (check box in the first row is checked)
2. The user modifies value for column X, let's say some combo box value, in the first row

Result: When the user finishes editing the previous check box selection is gone (first check box is not checked). It looks like the check box is automatically deselected after any editing in the corresponding. The most curios fact is that from code perspective the row is still selected:
        selectionModel.isSelected(0) equals to true

The question is how to avoid such situation as it confuses the user and current implementation is not acceptable at all.
Anyone any suggestions?

Thanks in advance,
Marek
Reply all
Reply to author
Forward
0 new messages