Groups | Blog | Home
all groups > flash actionscript > october 2004 >

flash actionscript : 2 Datagrid questions



Michael Dunn
10/20/2004 4:52:32 PM
[quoted text, click to view]

First one is done with the following:

dataGrid.removeColumnAt(index_of_column);

The second one is a little more complex, but not too bad; the following
code should get you on your way (hopefully :))

//first you'll need to create an object that will work as a listener
// for example our grid will have the following columns: ID, Name,
// Description

var gridListener = new Object();
gridListener.cellPress = function(event) {
item = grid.getItemAt(event.itemIndex);
//then just call your function from here
functionCall(item.ID, item.Name, item.Description);
};
grid.addEventListener("cellPress", gridListener);

Boyne
10/20/2004 8:19:44 PM
1. Can I hide one of the columns of a datagrid - if so how?
2. When using datagrids how do I access the data that has got row level focus and pass it to a separate function

Many thanks


AddThis Social Bookmark Button