PDA

View Full Version : grid panel not open into tab panel in separate tab



pankajh24
14 Jul 2017, 9:01 PM
Hi,
i m creating a tab panel under the simple panel but when i clicked in single tab i dint see grid panel, m calling Grid panel in tab items property but not able to see grid panel....please check the code...


Ext.define('AM.view.user.Temphome', {
extend: 'Ext.panel.Panel',




initComponent: function () {
var me = this;


this.InfoPanel = new Ext.form.Panel({
xtype: 'layout-border',
requires: [
'Ext.layout.container.Border'
],
layout: 'border',
width: 1320,
height: 620,
autoshow: false,
bodyBorder: false,
defaults: {
collapsible: true,
split: true,
bodyPadding: 10
},
items: [


{
title: 'Navigation',
region: 'west',
floatable: false,
margin: '5 0 0 0',
width: 200,
minWidth: 180,
maxWidth: 250,
html: '<p>Secondary content like navigation links could go here</p>'
},
{
region: 'center',
xtype: 'tabpanel', //Tab Panel
items: [{
title: 'Add User',
bodyPadding: 10,

},
{
title: 'User Details',
bodyPadding: 10,
items: [this.Grid], // calling grid panel view here
listeners: {
activate: function (tab) {
this.fireEvent('callingGrid');
}
}


}]
}


]
});




this.HomePanel = new Ext.Panel({
width: 1320,
height: 620,
border: false,
header: false,
layout: 'fit',
dockedItems: [{
xtype: 'toolbar'
// items: searchItems
}],
items: [this.InfoPanel]
});
this.items = [this.HomePanel];








this.userList = new AM.view.user.List({ //Grid panel View
listeners: {
editContact: function (value, index) {
me.editContact(value, index);
}


}
});


this.Grid = new Ext.Window({
Height: 500,
width: 500,
border: false,
header: false,
layout: 'fit',
dockedItems: [{
xtype: 'toolbar'
//items: searchItems
}],
items: [this.userList]
});










this.callParent();


}


});

Gary Schlosberg
17 Jul 2017, 8:26 AM
You've posted in the Ext JS 2 forum but your code is a newer version. Which specific version of Ext JS are you running?

pankajh24
28 Jul 2017, 4:03 AM
I m Using Ext Js 4 MVC architecture

Gary Schlosberg
1 Aug 2017, 5:58 AM
Can I ask why your grid is a window instead of a gridpanel?

pankajh24
1 Aug 2017, 10:50 PM
actually before some day i m opening a grid panel in window but its wrong way..so now m displaying grid panel into container, my problem is solved..thank you

Gary Schlosberg
4 Aug 2017, 2:02 PM
Glad to hear it. Thanks for sharing your solution with the community.