Opening a div (container) on the groupclik of the grid.
Opening a div (container) on the groupclik of the grid.
Hi ALL,
I have Ext Js grid, i am using it with group and goupsummary features.
I want to open up a div(container) on the click of the Group Name.
Following is the code i am trying but its not working:
********************************************************************************
Ext.onReady(function () {
GridCode
{
...... Code of grid and all .......
}
listeners:
{
groupclick: function (arg1, arg2, arg3, arg4)
{
alert('hi'); //This fires fine that means 'groupClick' is firing.
// But following two lines don't work .... dont know why.
Ext.getCmp('contDetails').hide(true);
Ext.getCmp('contDetails').getEl().show();
}
}
});
// Following is the container(div) which i want to show on groupclick.
var newContainer = new Ext.Container({
id: 'contDetails',
width: 900,
height: 200,
renderTo: Ext.getBody(),
hidden: true,
style: 'background-color: #DEDEDE'
});
Following code is also not working:
************************************************************************
listeners:
{
groupclick: function (arg1, arg2, arg3, arg4)
{
var b = Ext.getBody();
b.appendChild(newContainer);
}
}
placing 'newContainer' outside of the Ext.onReady().