Hi all,
I have a DataGridCollumn where I display the time in Seconds (i.e. 77). I would like to convert the diplayed time into minutes and seconds. I have a function, that converts the seconds into minutes and seconds, i.e. 1:17 The function is named secondsToMinuteString. Here's the code: private function secondsToMinuteString(secs:Number):String { if (isNaN(secs) == false) { var m:Number = Math.floor(secs / 60); var s:Number = secs - (m * 60); var r:String = m + ":"; if (s < 10) { r += "0"; } return r + s; } return ""; } I now try to seconds of the DataGridCollumn, by using this approach: <mx:DataGridCollumn headerText="Duration" dataField="length_seconds" labelFunction="secondsToMinuteString(length_seconds)" /> I try to pass the value, that is received to the function, and then it shall be displayed. This doesn't work, as I get a cast error (Error #1067) and an access of undefined property length_seconds error (Error #1120). Can anyone tell me, how I can convert this correctly? I am still seeking for a Flex Developer, who could assist me. If you are interested, please let me know by private email. Thanks a lot for your answers. Best regards, Pascal -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/