Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Integrate UI components in ListGrid

$
0
0
Hi,

is there an option to show UI components in ListGrid? I have to show a slider in the record cell, and the best I've done so far is to add setEditorCustomizer to the ListGrid using SliderItem.
Code:

listGrid.setEditorCustomizer(new ListGridEditorCustomizer() {
                        public FormItem getEditor(ListGridEditorContext context) {
                                ListGridField field = context.getEditField();
                                if (field.getName().equals("rate")) {
                                        SliderItem sliderItem = new SliderItem();
                                        sliderItem.setMinValue(1.0);
                                        sliderItem.setMaxValue(10.0);
                                        sliderItem.setNumValues(10);
                                        sliderItem.setHeight(30);
                                        return sliderItem;
                                }
                                return context.getDefaultProperties();
                        }
                });

The code works well and the slider is shown when the user clicked on the records, but is there an option to show the slider(or any other UI component) initially on the list, without the need of user click.

Viewing all articles
Browse latest Browse all 4756

Trending Articles