PDA

View Full Version : Novice question



AEKirin
22 Nov 2012, 6:26 AM
I have an existing MVC application that I am trying to add to using ExtJS. &nbsp;I built a controller, view (grid panel), model, store etc. <br>In the app.js, in the launch method, I created an Ext.container and as an item I have my view that I render that to an html div element. &nbsp;This works ok if I have my store defined in the view (this.store = {...}) but once I try to use an external store (store: myStore;) the grid is not displayed. &nbsp;<br><br>If I inspect the elements using chrome I can 'see' that the data is there, but the grid does not show in the div element<br><br>Thanks

dawesi
22 Nov 2012, 8:22 PM
can you provide some code?

AEKirin
23 Nov 2012, 4:43 PM
As I was putting together code to send you I found what is causing the issue. The <div> that I am rendering the view into is initially set to display=none. When I set the <div> to display=block the view is not displayed but upon inspection the data is there.

If the <div> is initially set to display=block and the view is rendered all is well, even if then set display=none and then back to display=block.

So something is happening when I render a view to a <div> that is initially set to display=none

Thanks