Column resize event please
Hi! I am trying to use the code I found here: http://www.activewidgets.com/javascript.forum.1743.8/capture-column-resize-event.html
to capture the column resize event so I can resize columns in other grids on the page. My first step is to get the sizes of all columns in the grid whose columns are being resized. But it bombs on the line I marked.
var alertWidths = function()
{
var i;
var widths = [];
var count = obj.getColumnProperty("count");
for (i = 0; i < count; ++i)
{
// BOMBS ON THE LINE BELOW:
widths[i] = obj.getTemplate("top/item", i).element().offsetWidth;
}
alert(widths);
}
The error is: 'undefined' is null or not an object
So I chose to Debug it in MS Visual Studio 2003 and it shows this function:
AW.dispatch = function(element, event){
var type = "_on" + (events[event.type] || event.type) + "Event";
var target = AW.object(element.id);
var obj = target;
while (obj._parent){
obj = obj._parent;
}
//**** HIGHLIGHT IS ON THE LINE BELOW:
return target[type].call(obj, event);
};
What am I doing wrong ? What are my other options? I need when I resize columns in one grid to propagate it to other grids.
Many thanks in advance,
to capture the column resize event so I can resize columns in other grids on the page. My first step is to get the sizes of all columns in the grid whose columns are being resized. But it bombs on the line I marked.
var alertWidths = function()
{
var i;
var widths = [];
var count = obj.getColumnProperty("count");
for (i = 0; i < count; ++i)
{
// BOMBS ON THE LINE BELOW:
widths[i] = obj.getTemplate("top/item", i).element().offsetWidth;
}
alert(widths);
}
The error is: 'undefined' is null or not an object
So I chose to Debug it in MS Visual Studio 2003 and it shows this function:
AW.dispatch = function(element, event){
var type = "_on" + (events[event.type] || event.type) + "Event";
var target = AW.object(element.id);
var obj = target;
while (obj._parent){
obj = obj._parent;
}
//**** HIGHLIGHT IS ON THE LINE BELOW:
return target[type].call(obj, event);
};
What am I doing wrong ? What are my other options? I need when I resize columns in one grid to propagate it to other grids.
Many thanks in advance,
Michael Z
August 10,