Я сделал GridPanel от ExtJS 3.4, высота: 200. Иногда мне нужно менять высоту.ExtJS сетка не обновится после setHeight
Когда я устанавливаюHight (65), чтобы сделать его короче, а затем setHeight возвращается к своей первоначальной высоте: 200, сетка кажется возвращенной на 200 высоты с рамкой, но содержимое внутри остается внешним видом, поскольку я устанавливаю его в высота 65 Я попытался ниже после setHeight, но не повезло:
grid.setHeight(200);
//myStore.load();
//myStore.reload();
//myStore.getStore().load();
//grid.render();
//grid.getView().refresh();
//grid.getView().refresh(true);
//grid.getView().updateLayout();
//grid.doLayout(); //just tried not okay
//the code:
grid = new Ext.grid.GridPanel({
id: "myGrid",
store: myStore,
selModel: mySelectionModel,
columns: [
mySelectionModel,
{
id: 'name',
header: "Item",
width: 240,
menuDisabled: true,
dataIndex: 'name'
}
],
height: 200,
width: 280,
listeners: {
"keydown": function (e) {
if (e.getKey() == 17) {
mySelectionModel.clearSelections();
}
}
}
});
//another item on top of the gird enlarged code here, so shorter the grid:
grid.setHeight(65)
//the item on top returned to be smaller code here
//so then I return the height of the grid to its original in the line below:
grid.setHeight(200);
//however, after the above line, the content remains as the height of 65
вы можете добавить простую скрипку? –
Или просто добавить еще код? что такое сетка? сетка или сетка? –