It's default is null (obviously). Any idea how I can modify
the "call" to sortCompareFunction in the dataGridColumn line to add
this argument to the function call?

--- In [email protected], "Doug Lowder" <[EMAIL PROTECTED]>
wrote:
>
>
> The DataGridColumn docs
>
<http://livedocs.macromedia.com/labs/1/flex20beta2/langref/mx/control
s/d\
> ataGridClasses/DataGridColumn.html#sortCompareFunction>   say the
> sortCompareFunction gets passed a fields parameter in addition to
the
> item objects being compared.  Have you checked the fields
parameter to
> see what's in it?
>
> Doug
>
>
> --- In [email protected], "djbrown_rotonews"
> <djbrown_rotonews@> wrote:
> >
> > bump. any help?
> >
> > --- In [email protected], "djbrown_rotonews"
> > djbrown_rotonews@ 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




Reply via email to