--- In [email protected], "djbrown_rotonews"
<[EMAIL PROTECTED]> wrote:
>
> anyone? I've seen similir questions asked before, and never saw an
> answer that directly pertains to the DataGrdColumn issue.
>
> --- In [email protected], "djbrown_rotonews"
> <djbrown_rotonews@> wrote:
> >
> > I'm using Flex Beta 2 and wanting to implement a generic sort
that
> > will handle the approximate 20 columns I'm displaying.
> >
> > I've got it set up as follows:
> > <mx:DataGridColumn id="col1" resizable="false"
> > textAlign="center" fontWeight="bold" headerText="STA"
> > width="{dgDelays.width/22}" headerWordWrap="on"
> dataField="acfrmsta"
> > labelFunction="labelFunction" sortCompareFunction="sortAlpha"/>
> >
> > and my sortAlpha takes the form of:
> > public function sortAlpha(a:Object,b:Object):int {
> >
> > var field:String="acfrmsta";
> > var string1:String = a[field].attribute("dataValue");
> > var string2:String = b[field].attribute("dataValue");
> >
> > if (string1==string2)
> > return 0;
> > else if (string1 < string2)
> > return -1;
> > else
> > return 1;
> > }
> >
> > as you can see, I have to hard-code in the value of arfrmsta in
> the
> > sortalpha() method. How can I drill down and get this value
> > programatically if I don't have access to something like
> columnIndex
> > (which DOES exist apparently in DataGridListData)? Either that,
or
> I
> > can iterate over the column headers if something like
> isItemSelected
> > () existed.
> >
>
--
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
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

