View Full Version : [GXT 1.1 alpha 4] Problem with Check Columns in Editor Grid When Editing

5 Sep 2008, 7:22 AM
So I have added a check box column to my grid using this code:

config = new CheckColumnConfig(id, header, width);

// set the editor
CheckBox cb = new CheckBox();
config.setEditor(new CellEditor(cb));
When the cell is rendered it looks great, but during the editing of the cell all formatting is lost. For example the CheckBox is no longer centered, shadows and other styling is lost. For text cells there is a subtle gradient and alignment does not appear to be affected.

It appears that the problem may be the dichotomy between the styling applied in init() to the cell renderer and the (lack) of styling applied to the cell editor.

My feeling is that with this specializaztion then the Config should automatically add the editor and apply the same style to ensure a consistent look and feel while editing. This would eliminate the need for the developer to specify the editor and you could ignore values they set.

The drawback to this approach is it removes flexibility in the approach the developer wants to use to edit the value (e.g. ComboBox with 'true'/'false' or 'on'/'off') but since this is a "check column" that shouldn't be an issue. You could add a "BooleanColumnConfig" to allow for other presentations should the editor be automatically specified in CheckColumnConfig.