Frage

I want to refresh a dojo grid in my web page. I tried .refresh which is given in dojotoolkit.org without success. is there any other convenient way to do refreshing? Thanks in advance.

War es hilfreich?

Lösung

Maybe this helps. This is the way i refresh my Grid:

if(!registry.byId("GraphGrid")){
        var grid = new EnhancedGrid({
                    id: 'GraphGrid',
                    store: GraphicStore,
                    query: { ident: "*" },
                    structure: layout,
                    rowSelector: '20px',
                    plugins: {
                        indirectSelection: {
                        headerSelector:true, 
                        width:"40px", 
                        styles:"text-align: center;"
                        }}                          
                    },"GridGraphicInMap");

                /*Call startup() to render the grid*/
                grid.startup();

                dojo.connect(grid, "onRowClick", grid, function(evt){
                    var idx = evt.rowIndex,
                        item = this.getItem(idx);

                    //  get a value out of the item
                    var value = this.store.getValue(item, "geom");
                    highlightGeometry(value,true);
                    //  do something with the value.
            });
        }
        else {
          registry.byId("GraphGrid").setStore(GraphicStore);
        }

When i first call my function the grid is generated. Evrytime i call the function later only the store is refreshed.

Regards, Miriam

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top