3.2.0

Issue with onScrollWidthChanged and getScrollWithd .....

By placing an getScrollWithd alert before document.write(obj) I am getting a value of :
0050505050501001001001001001000...
which could be normal, but getting same value after obj.setSize('800','800'); isn't what I'm expecting, so I tried with onControlWidthChanged & onScrollWidthChanged but seems that is not firing.

Also FF does not detect a change on onScrollLeftChanged.
(tried timing and try/catch)
I only can find the related post #14018 , didn't help much on my case.
What event should I use to detect that a grid size has changed??
Thanks


Carlos
September 3,
A related issue that describes what I am trying ...

If I place a delayed refresh (in a button click) after resize a grid, then, IE recalculates the rows displayed by virtual mode, but FF3 and Safari ( did not tried Opera, Chrome ,other FF versions nor IE8) does not show the rows below of the new size.

And without any event that detects grid-size-changes I couldn't force a whole grid reconstruction, although a virtual recalc. would be much better (if possible).
Please Help! , I am sitting in a no way out bucle. :)
Thanks in Advance.


<script> 
var obj = new AW.UI.Grid; 
obj.setCellData(function(col, row){return col + "." + row});
obj.setHeaderText("header"); 
obj.setColumnCount(34); 
obj.setRowCount(138); 
obj.setVirtualMode(true);

document.write(obj); 

var buttonAA = new AW.UI.Button; 
buttonAA.setControlText("Test"); 

buttonAA.onControlClicked = function(){ 
obj.setSize(800,600);
  obj.setTimeout(function(){
  obj.refresh();
 },1200); 
}
document.write(buttonAA);
Carlos
September 21,
Found the fix for virtual mode render recalculation in:
http://www.activewidgets.com/javascript.forum.21650.0/dynamic-height-on-a-data.html
which points to a 2.5.2 bug fix release:
http://www.activewidgets.com/general.bugs/2-5-2.html
But the topic "Grid content disappears on resize (ie6, strict doctype)" link is pointing to a different thread:
http://www.activewidgets.com/javascript.forum.21668.0/bug-aw-2-5-1.html
And supposed to be fixed in 2.5.2/2.5.3/2.5.4 ???

Still searching for a way to auto detect grid-size-changes...
Carlos
September 25,
Found "onContentHeightChanged" which could help , but seems that fires a not exactly number of times ( called from other AW controllers?) so, if I only know the last time it fires, then I would use it for auto-grid-size-detection...
Carlos
September 27,
Hi Carlos, onScrollWidthChanged seems to just set the style width for the scroller in question. It doesn't return a value. The value you were getting of 0050505... is probably the value of the object/function itself (equivalent to a pointer value in C-like languages).

onContentHeightChanged calls changePanelHeight for the view. You could overwrite that with your own function. But I'd recommend waiting for a response from Alex. Perhaps a better approach would be to have an event raised in the AW function itself. Would need to do it to changePanelWidth too.
Anthony
September 28,
Thanks Antony,
Your comment give me some new ideas about detecting grid size changes.
I will come back if I success in my simulation testings.
Carlos
September 29,
Hi Carlos,

Can I ask what you're working on?
Anthony
September 29,
Sure!
Nothing really important, just a personal project, a win32 exe portable database application.
Can I ask if you're asking because have a job vacancy for me? ...;-)
Carlos
September 29,
> Can I ask if you're asking because have a job vacancy for me?

I'm in the same boat as you. Thought I'd put my free time to good use. The calendar widget is one of projects I'm doing. Another is a menu widget. I'm also thinking of going back to the drag and resize code I did a while back and work out how to incorporate them into AW objects properly.
Anthony
September 30,
Great,
It sounds like a nice set of improvements.
I also have some unfinished 'experiments' abandoned a while back like a super-grid or a drag-reorder columns I couldn't launch in all browsers.
Maybe is time to rethink on it.
Humm.... or, maybe time to put it all together , and ( with Alex permission) launch a extAW pack product ? ;-)

Carlos
October 1,

This topic is archived.

See also:


Back to support forum