Regards
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
--
----------------------------
Igor Costa
www.igorcosta.com __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- RE: [flexcoders] Help understanding AMF vs Socket? Peter Farland
- Re: [flexcoders] Help understanding AMF vs Socket? Rick Schmitty
- [flexcoders] DataGridCollumn: Display formatted valu... Pascal Schrafl
- Re: [flexcoders] DataGridCollumn: Display format... Igor Costa
- Re: [flexcoders] DataGridCollumn: Display fo... Pascal Schrafl
- [flexcoders] Re: DataGridCollumn: Displa... greenfishinwater
- Re: [flexcoders] Re: DataGridCollum... Pascal Schrafl
- [flexcoders] VideoPlayer Example Pascal Schrafl
- Re: [flexcoders] VideoPlayer Example John C. Bland II
- Re: [flexcoders] VideoPlayer Example Pascal Schrafl
Reply via email to