Mar 23, 2013, 2:41 PM
[CLOSED] After changing Ext Version from V2.1 to V2.2.0.27432 the GridPanel throws javascript errors on some actions.
Team,
Recently we updated the DLL from V2.1 to V2.2.0.27432, and existing code which used to work with V2.1 does not work properly now.
Below are the functionalities which give javascript errors on certain actions in the gridpanel.
In the breaking changes list there are no changes which have been highlighted on these functionalities.
I have a grid which uses infinite scroll to load the data using OnReadData event. And each cell of the the grid will be having a mouse over event on which there will be tooltip shown based on certain conditions. Everything used to work with V2.1 but after changing it to V2.2 it does not...!
1. Tooltip for the grid has some action on mouse over, which throws js error(it used to work with V2.1),
===== Code behind ==========
2. The grid loads the data using Infinite Scrolling method and has a onReadData event, for this there is javascript event written but still it throws error. The same worked with V2.1 but after using the new version it throws javascript error.
Please request your help on this.
Cheers...
Recently we updated the DLL from V2.1 to V2.2.0.27432, and existing code which used to work with V2.1 does not work properly now.
Below are the functionalities which give javascript errors on certain actions in the gridpanel.
In the breaking changes list there are no changes which have been highlighted on these functionalities.
I have a grid which uses infinite scroll to load the data using OnReadData event. And each cell of the the grid will be having a mouse over event on which there will be tooltip shown based on certain conditions. Everything used to work with V2.1 but after changing it to V2.2 it does not...!
1. Tooltip for the grid has some action on mouse over, which throws js error(it used to work with V2.1),
===== Code behind ==========
ToolTip toolTip = new ToolTip
{
ID = grid.ID + "_ToolTip",
Target = "={#{" + grid.ID + "}.getView().el}",
Delegate = ".x-grid-cell",
//TrackMouse = true,
Closable = true,
AutoHide = false,
Draggable = true,
AutoFocus = true,
MouseOffset = new int[] { -9, -9 }
//Resizable = true,
};
//toolTip.HideMode = HideMode.Display;
toolTip.Listeners.BeforeShow.Handler = "return onBeforeShow(#{" + toolTip.ID + "}, #{" + grid.ID + "});";
toolTip.Listeners.Show.Handler = "onShow(#{" + toolTip.ID + "}, #{" + grid.ID + "});";
form1.Page.Controls.Add(toolTip);
======== js code ================================================== ======== var onBeforeShow = function(toolTip, grid) {
var view = grid.getView();
store = grid.getStore();
rowIndex = view.findItemByChild(toolTip.triggerElement).viewIndex;
record = store.getAt(rowIndex);
column = view.getHeaderByCell(toolTip.triggerElement);
var isToolTipToBeShown = false;
if (column !== undefined) {
//checking if the tooltip exists for this cell
//data+'_Tooltip'
var toolTipColumnIndex = column.dataIndex + '_Tooltip';
if (!(record.get(toolTipColumnIndex) == undefined || record.get(toolTipColumnIndex) == null || record.get(toolTipColumnIndex) == '')) {
isToolTipToBeShown = true;
}
}
return isToolTipToBeShown;
};
var onShow = function(toolTip, grid) {
debugger;
var view = grid.getView();
store = grid.getStore();
rowIndex = view.findItemByChild(toolTip.triggerElement).viewIndex;
record = store.getAt(rowIndex);
column = view.getHeaderByCell(toolTip.triggerElement);
if (column !== undefined) {
data = record.get(column.dataIndex);
//checking if the tooltip exists for this cell
//data+'_Tooltip'
var toolTipColumnIndex = column.dataIndex + '_Tooltip';
if (record.get(toolTipColumnIndex) !== undefined && record.get(toolTipColumnIndex) !== null && record.get(toolTipColumnIndex) !== '') {
data = record.get(toolTipColumnIndex);
toolTip.focus();
toolTip.show();
toolTip.update(record.get(toolTipColumnIndex));
}
}
};
================================================== ===============================2. The grid loads the data using Infinite Scrolling method and has a onReadData event, for this there is javascript event written but still it throws error. The same worked with V2.1 but after using the new version it throws javascript error.
Please request your help on this.
Cheers...
Last edited by Daniil; Mar 28, 2013 at 4:21 AM.
Reason: [CLOSED]