开发者

ExtJs: Programly select rows of a GridPanel in an inactive tab not working?

开发者 https://www.devze.com 2023-02-13 14:38 出处:网络
Basicly, I have a window contains two tabs, the second tab is a GridPanel and is initially inactive. I want to programly select two rows of this GridPanel(via CheckboxSelectionModel) by click开发者_S

Basicly, I have a window contains two tabs, the second tab is a GridPanel and is initially inactive.

I want to programly select two rows of this GridPanel(via CheckboxSelectionModel) by click开发者_StackOverflow中文版ing a "show window" button , but found it not working. There will be a javascript error thrown and no rows selected. After I manually clicked the second tab to make the grid visible, everything works well.

what's the most possible mistake I made? I'll paste the code soon if it's not a common mistake for extjs beginner.


This is because your tabpanel will not render any components that are not visible (i.e., any components in your second tab in this case).

If you add the following config option to your Ext.TabPanel it should fix your problem:

deferredRender: false

0

精彩评论

暂无评论...
验证码 换一张
取 消