mmm i would have assumed that the simple dot notation of mycolumn.labelFunction = myFunction; should have called the set method on the DataGridColumn.
maybe do it this way?? mycolumn.labelFunction = Function() { //do the do here } i'm not sure .. just guessing! Andrew --- In flexcoders@yahoogroups.com, "joao_m_fernandes" <[EMAIL PROTECTED]> wrote: > > Hi there, > > I'm populating a DataGrid and from user selection, columns are added > and removed. Everything works fine excepting defining a labelFunction > to a column. > I'm using this code to define a new column and the function to be used > eurodate. > > var DataGridColumn = new mx.controls.gridclasses.DataGridColumn; > DataGridColumn.columnName = "data_fim"; > DataGridColumn.__header = "Até"; > --->>> DataGridColumn.__labelFunction = eurodate(); > DataGridColumn.textAlign = "center"; > colunas.push(DataGridColumn); > > I tried: > DataGridColumn.labelFunction = eurodate(); > DataGridColumn.labelFunction = eurodate; > DataGridColumn.__labelFunction = eurodate(); > DataGridColumn.__labelFunction = eurodate; > > none worked. > Any Clue? > > Thanks, > João Fernandes Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/