Is it possible to call the function by using the datagrid column?
Is it possible to call the f开发者_开发技巧unction 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...
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;
...
}
}
精彩评论