Hi, Is it possible to call the function by using the datagrid column item? I want to call the function while the user click the particular column item in the datagrid? Thank's in advance...
A:
You have to assign an eventhandler on the datagrid, and use a switch, which calls a function based on what you clicked on.
myDataGrid.addEventListener(DataGridEvent.ITEM_FOCUS_IN,clickFunction);
private function clickFunction(e:DataGrigEvent):void
{
switch(e.label)
{
case 'function1': function1(); break;
case 'function2': function2(); break;
...
}
}
Biroka
2010-05-17 13:56:35
You can assign an ITEM_EDIT_BEGIN event too, but I don't remember if you have to let the datagrid to be editable or not, but you can try it how works the best.
Biroka
2010-05-17 13:59:46
thank's ,i will try
maniohile
2010-05-24 06:02:24