Возможно, это поможет. Так я обновляю свою сетку:
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);
}
Когда я впервые вызываю свою функцию, генерируется сетка. Evrytime Я вызываю функцию позже, только обновление магазина обновляется.
С уважением, Miriam
Ключ к освежению в этом коде сбрасывает магазин. Кстати, сетки в 'dojox/grid' устарели; если вы начинаете что-то новое, замены будут [dgrid] (http://dgrid.io) (рекомендуется) или [gridx] (https://github.com/oria/gridx). –
Спасибо, оба :) это помогло – Amila