Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid loaded partially

    Hi,

    I am using ListGrid in my app but i detect a different behavior in FF and Chrome.
    In FF it works well, all my data as shown in the listgrid (there is no update of data in this listgrid) but in chrome when the data as loaded, if I use the filter very quickly, I can see that all the data are not loaded? What could be the problem? I am using datasource just with 2 fields (code and label).

    This is the creation of my datasource:
    Code:
    public class GWTCodeLabelDataSource extends DataSource {
    
        public GWTCodeLabelDataSource(final List<GWTCodeLabel> list, final String titleCode, final String titleLabel) {
            super();
    
            DataSourceTextField codeField = new DataSourceTextField("code", "Code");
            codeField.setRequired(true);
            codeField.setPrimaryKey(true);
    
            DataSourceTextField labelField = new DataSourceTextField("label", "Label");
            labelField.setRequired(true);
    
            this.setFields(codeField, labelField);
            this.setClientOnly(true);
    
            for (GWTCodeLabel codeLabelGWT : list) {
                this.addData(new GWTCodeLabelRecord(codeLabelGWT.getCode(), codeLabelGWT.getLabel()));
            }
    
        }
    }
    And here my initialisation of my listgrid :
    Code:
    private void initListGrid(final DataSource dataSource, final boolean filter, final String heightPct,
                final String widthPct) {
            if (listGrid == null) {
                listGrid = new ListGrid();
                listGrid.setHeight(heightPct);
                listGrid.setWidth(widthPct);
                listGrid.setAlternateRecordStyles(true);
                listGrid.setAutoFetchData(true);
                listGrid.setDataSource(dataSource);
                listGrid.fetchData();
                listGrid.setShowFilterEditor(filter);
                listGrid.setFilterOnKeypress(filter);
                listGrid.setShowHeader(false);
                listGrid.setCanReorderFields(false);
                listGrid.addRecordClickHandler(new RecordClickHandler() {
    
                    @Override
                    public void onRecordClick(final RecordClickEvent event) {
                        fireRecordSelected(event.getRecord());
                    }
                });
                listGrid.draw();
            }
        }
    I hope someone will help me.

    I am here if you have any questions.

    Thanks a lot.

    (SmartGWT 2.2, under FF and Chrome)
Working...
X