3.0 beta 2

Bug in 2.0.1 - grid top row disappears

Unfortunately there is a new bug in 2.0.1 code - the grid top row disappears (scrolls up under the header) when call to setSelectedRows() happens during initialization.

var obj = new AW.UI.Grid;
    obj.setCellData("cell");
    obj.setHeaderText("header");

    obj.setColumnCount(10);
    obj.setRowCount(2);

    obj.setSelectedRows([0]);
//	obj.setScrollTop(0);

    document.write(obj);


The possible workaround - explicitly set scroll top to 0,

obj.setScrollTop(0);
Alex (ActiveWidgets)
June 14,
Do you have an ETA for a "real" fix for this? The workaround appears to work, but I'd rather not have to remember to use it everywhere I change the row selections. :)
June 19,
No dates yet but I will try to make a patch ASAP and this shuld be fixed in 2.0.2 for sure :-(.
Alex (ActiveWidgets)
June 19,
Hi Alex,

The ver 2.0.1 seems to fix my other problems but introduced this new one. I am keeping the selected row in session and highlight it when the user comes to screen again. If he had not selected any row previously or when the row selection is not in session, I highlight the first row.

obj.setScrollTop(0) does not work for me because if the user has selected any row in between, the table scrolls up without the selected row in view....

Any workarounds would be highly appreciated.............
Arun Iyer
June 20,
alex, ur code fix this bug but increment a new one:
When table does not hav scroll, the first line just don't show data, any idea now?

tkz.
Pc
September 25,
Hi Alex, i have the same problem about "setScrollTop". When 2.0.2 ver will be released?
Stefano
October 16,
Hi Alex,
I have a problem with an ActiveWidget grid. ie
I am loading the grid with 980 records. Now I am scrolling the grid and select a grid row id of 789 and moving to another page.I am storing selected row id in my session.Again when I come back to this screen, I need to highlight the same grid row and using 'scrolltop' the record to be visible.

But what happens, as soon as the grid got created with the scrolltop, the row is getting highlighted and visible.But since the records in the grid is getting late to load on the grid, the grid is highlighting the first row as default.

Could you tell me some work around.
Nirmal
October 28,
I have 2 grids at my page.
The workaround

obj.setScrollTop(0);

does only function with the first grid.

In the second grid the grid top row still disappears..

Do you have a work around, when there are more than one grids at one page?


Claudia
November 3,
Another problem with Internet Explorer 7.0!!!

The grid top row disappears, although I set

obj.setScrollTop(0);

in the pages...


Please help!!

Claudia
November 3,
Try obj.setScrollTop(-1).... seems to work fine for me.
sam
November 22,
None of these workarounds work in our applications. Is there a target release date for 2.0.2 which fixes this bug?
Andy
November 30,
I've got this trouble (as all of us, i think), but i found something interesting.

I've written this code after printing the grid (and the onHeaderClick is disabled)

...
obj.setSelectionMode("single-row")
obj.setCurrentRow(1);
obj.setSelectedRows([0]);


So my first row is not visible, but if i click in the header separator, an event is fired (i don't know which one it is), after a second the grid seems to be reconstructed and the first row is visible!

Maybe this can help to get a solution for this issue

PD: sorry for my english.
vas
December 12,
Ups i think it fires the "obj_OnClick" event, but dunno what happens after that :S
vas
December 12,
I ran into the same issue where when setting the selected row; the grid scrolls down by itself. The strange part is if the call to setSelectedRows () is delayed, or triggered after the grid loads (via button click, etc) it works fine, just not inline with the grid initialization.

Here's my code:
// Init grid
            var myCells = [
                ["MSFT","Microsoft Corporation", "314,571.156"],
                ["ORCL", "Oracle Corporation", "62,615.266"]
            ];
            var myHeaders = ["Ticker", "Company Name", "Market Cap."];

            var grid1 = new AW.UI.Grid;
            grid1.setId("grid1");

            // assign cells and headers text
            grid1.setCellText (myCells);
            grid1.setHeaderText (myHeaders);
            grid1.setSelectionMode ("single-row");
            grid1.setColumnCount (myHeaders.length);
            grid1.setRowCount (myCells.length);

            // Select first row (0)
            grid1.setSelectedRows ([0]);
            grid1.setScrollTop (-1);
            grid1.refresh ();


Just change the [0] to whatever row you want selected when the grid loads.
Jason Johnson
January 9,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.