Hello,

can someone provide an example of calling a datagrid labelFunction
from actionscript.

I am currently creating a dynamic datagrid using actionscipt that
loops through the days of a month and I have added the labelFunction
as below. I am not sure what parameters I need to pass to the
labelFunction. I have set an arrayCollection as the datagrid's
dataProvider.

for (var i:int=0; i< numDays; i++){
   var newDGCol:DataGridColumn = new DataGridColumn();
   newDGCol.headerText = String(i+1);
   newDGCol.width = 25;
   newDGCol.sortable = false;
   newDGCol.dataField = "userSchedule";
   newDGCol.labelFunction = showUserScheduleType(); //What parameter
do I pass to the labelFunction
   cols.push(newDGCol);
}  

//Label Function I am using to test this

private function showUserScheduleType(item:Object):void {

   trace('xml user schedule data ' + ObjectUtil.toString(item));
}

Thanks for any help or direction on using actionscript to call a
labelFunction.

Don
                        }

Reply via email to