我有2个网格面板,一个在主窗口中,另一个面板(第一个网格面板的克隆)在同一窗口中弹出。
我想以某种方式同步两个面板,以便如果我们对一个面板进行排序,它应该自动对另一个具有相同列排序的网格面板进行排序,并且如果对一个面板应用了客户端过滤器,它应该反映另一个网格面板。
我要从第一个面板的标题双击打开第二个网格面板。
代码:
headerEntry.on('dblclick', function () { me.maximizeWindow(me, this, parentPanel) });//It will open 2nd grid panel from first panel's header double click.
maximizeWindow: function (parentWindow, header, parentPanel) {
var parentHeight = parentWindow.getHeight();
var parentWidth = parentWindow.getWidth();
var height = ((parentHeight - 100) / parentHeight) * 100;
var width = ((parentWidth - 100) / parentWidth) * 100;
var win = Ext.widget('window', {
title: '',
height: height + '%',
width: width + '%',
layout: 'fit',
id: parentPanel + "_Child",
itemId: 'dashboardWin' + parentWindow.customParams.dashboardId,
minimizable: true,
constrain: true,
resizable: false,
draggable: false,
modal: true,
header: false,
anchor: '100%',
x: parentWindow.getX() + 50,
floating: true,
closable: false,
constrainTo: parentWindow,
monitorResize: true,
renderTo: parentWindow.getEl(),
maskClickAction: 'hide',
listeners: {
boxready: function () {
var win = this;
Ext.EventManager.on(document, 'keyup', function (e) {
var keyValue = e.getKey();
if (keyValue == 27) { //on escape button it will close popup grid and first grid should reflect with changes done in 2nd grid.
}
// rest code