ActionScript 2.0 Components Language Reference |
|
|
|
| CellRenderer API > CellRenderer.getCellIndex() | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
componentInstance.getCellIndex()
None.
An object with two fields: columnIndex and itemIndex.
Method; returns an object with two fields, columnIndex and itemIndex, that locate the cell in the component. Each field is an integer that indicates a cell's column position and item position. For any components other than the DataGrid component, the value of columnIndex is always 0.
This method is provided by the List class; you do not have to implement it. Declare it in your cell renderer class as follows, and use it in the functions in your cell renderer:
var getCellIndex:Function;
This example edits a DataGrid component's data provider from within a cell:
var index = getCellIndex(); var colName = listOwner.getColumnAt(index.columnIndex).columnName; listOwner.dataProvider.editField(index.itemIndex, colName, someVal);
|
|
|
|