PDA

View Full Version : [AS3] bug in horizontalScrollPolicy and editable in datagrid


s1301950
12-01-2008, 04:51 PM
I have a possible bug for datagrid in cs4 (as3). The scenario involves having horizontal scrolling, good number of columns and editable columns.

The following codes basically layout that particular scenario.

The bug is the edibility of columns on the far right. If you click on them to try to edit them, another column on the left of it would become editable instead.

anyone encountered this?


import fl.data.DataProvider;
import fl.controls.*;
import fl.events.*;
import fl.controls.dataGridClasses.*;

var dp:DataProvider = new DataProvider();

var i:uint;
for(i=0; i<47; i++) {
dp.addItem( { col1:i,
col2:"CellName",
col3:"CellName",
col4:"CellName",
col5:"CellName",
col6:"CellName",
col7:"CellName",
col8:"CellName",
col9:"CellName"} );
}

dg.addColumn("col1");
dg.addColumn("col2");
dg.addColumn("col3");
dg.addColumn("col4");
dg.addColumn("col5");
dg.addColumn("col6");
dg.addColumn("col7");
dg.addColumn("col8");
dg.addColumn("col9");
dg.dataProvider = dp;

for (i=0;i<dg.columns.length;i++)
dg.columns[i].editable = true;

dg.horizontalScrollPolicy= ScrollPolicy.ON;

isdito
02-28-2009, 12:42 PM
Anypeople knows any thing.

Sorry my bag english.

Mahalo
04-16-2010, 08:05 AM
Still no solution?

Mahalo
04-16-2010, 10:32 PM
I've been testing on it and everything is wrong.
dg.addEventListener(ListEvent.ITEM_CLICK, handleCell);
function handleCell(event:ListEvent):void {
trace(event.columnIndex);
}
This code returns a bad result too.

It seems the datagrid listens the mouse position and not the cell clicked (????).