PDA

View Full Version : How to use renderTo prop for rendering a DIV using classname



tsensuous.grace
20 Jun 2016, 3:59 PM
I want to render my panel to a div using a classname. The following renderTo does not work. I looked it up online and I see rendering only using a id, not class. Any idea about this?



this.on('afterrender', function(){
displayPanel = new Ext.Panel({
width : 650,
height : 300,
layout: 'fit',
title: 'Control technologies',
renderTo : Ext.select('.x-grid') //does not work
});
}, this);

jdkhamba
20 Jun 2016, 5:09 PM
You can use Ext.query instead:


Ext.query('.x-grid')[0]