PDA

View Full Version : New Ext JS 5 User Question



harplady
18 Jun 2014, 4:24 PM
Sorry, I know this is supposed for version 3 users, but I did not find a forum group for version 5 users. I'm wondering if anyone could answer my beginner question. I am building a comments grid which needs to be displayed on a tab in an application that is using JQuery + javascript. I am having trouble getting it to display. In my comments.js file, which contains all my Ext JS scripts, I set the renderTo property under my statement var grid = Ext.create('Ext.grid.Panel', to the name of a div in another html page, where I want it to display. Is the fact that the div is in another file a problem? Thanks very much to anyone who can provide some help! I need to have this project finished very quickly.

willigogs
18 Jun 2014, 9:48 PM
Check if the RenderTo div exists before creating the grid?

E.g.



if($('#renderToDivId').length > 0) {
var grid = // etc...
}

mitchellsimoens
20 Jun 2014, 4:27 AM
Sorry, I know this is supposed for version 3 users, but I did not find a forum group for version 5 users.

um... it towards the top of the list, it's the first category for Ext JS:

49409

http://www.sencha.com/forum/forumdisplay.php?124-Ext-JS-Community-Forums-5.x

mitchellsimoens
20 Jun 2014, 4:28 AM
Check if the RenderTo div exists before creating the grid?

E.g.



if($('#renderToDivId').length > 0) {
var grid = // etc...
}


Really? You are going to suggest jQuery?


var el;

if (el = Ext.get('renderToDivId')) {}