Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 08:18
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  Using the DataGrid component - Date problem
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Using the DataGrid component - Date problem  (Read 4419 times)
samson1
Server what's that
*
Posts: 44


View Profile
« on: 07/02/07, 00:38 »

Hi, I am retrieving dates via a PHP script (mySQL), and using the drag'n'drop Data Connection and DataGrid components using Flash MX (though I now have the lastest Pro version!).  The component interface allows you to set the data formats, including the date. 

I need to be able to sort the date, which also shows time of day.  I had hoped to present the date in the format:

Mon 27-06-2007, 2:34pm.

But having a real problem getting there.  Would anyone have a moment to provide the details on how to do this? ;-)  The date is stored in the database as a timestamp, and I can tweak the php script to provide the date in any format required.

It is not clear to me how to mix the drag'n'drop bits with actionscript (though I have had some success in setting fonts and colours via actionscript).

Many thanks in advance,
Geoff

Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #1 on: 07/02/07, 03:48 »

You can sort alphabetical, numerical or using a custom function, check http://weblogs.macromedia.com/pent/archives/2004/12/sorting_by_date.cfm

Jorge
Logged

samson1
Server what's that
*
Posts: 44


View Profile
« Reply #2 on: 07/04/07, 00:04 »

Thanks Jorge, I had seen that article before I posted my question, but will have a closer look.

Are you able to help me understand how to add actionscript when using the drag'n'drop components?  e.g. if I want to use actionscript to format my date (number), rather than having the component do it for me, where do I put the actionscript? 

I know that must seem like a dumb question, but I don't understand how components work.

Thanks
Geoff
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #3 on: 07/04/07, 01:22 »

Since sorting in the datagrid is a matter of pressing in the Column header, you should work in the datagrid context (that's the article about) If the sort is previous to display, I mean, no further sorting is allowed runtime, then you can just sort on backend.

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything