I want to add textfield into tbar in Grid panel, but it does not work.
And I tried with button then it works..
This code is not working, the error message say, TypeError: g.el is null
var grid = Ext.create('Ext.grid.Panel', {
...
tbar : [
{
xtype : 'textfield',
name : 'test'
}
]
});
But this code is working,
var grid = Ext.create('Ext.grid.Panel', {
...
tbar : [
{
xtype : 'button',
text : 'keyword'
}
]
});
Anybody know, why it happened?
I found,
it renderTo : ‘tableID’, but I changed to renderTo : Ext.getBody()
then it works. but I want to put the grid into specific html element, how should I do?
[Edit]
I want to insert to #listTable,
<div id="wrap">
<table id="listTable"></table>
</div>
I just tried to ‘wrap’ then it works,
So I tried, renderTo : ‘wrap > listTable’
but it does not work 🙁
The code below works without any error in 4.1.3. It may be a bug in your version? You can test it in one of the API demo boxes. Just copy paste it. The
tbarprop is ah shorthand for adockedItemthat get applied totop. A passed array get automatically inserted into atoolbar. Nothing more happends. So it must workEdit
renderTo requires a valid
id, a HTML Element or Ext.Element