Home  >  Article  >  Web Front-end  >  Solve the problem of extjs grid not adapting to the change of window size_extjs

Solve the problem of extjs grid not adapting to the change of window size_extjs

WBOY
WBOYOriginal
2016-05-16 17:02:16983browse

I recently encountered a problem. When using the grid, the window changed but the grid could not change adaptively. So I added this line of statement
The problem was solved. The rendering

Drag to enlarge The final effect

Added statement:

Copy code The code is as follows:

Ext.EventManager.onWindowResize(function(){
grid1.getView().refresh()
})

See the complete code;
Copy code The code is as follows:



grid










Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn