On 5/1/07, matmls <[EMAIL PROTECTED]> wrote: > ####### > <mx:DataGridColumn textAlign="left" headerText="Resource" > wordWrap="true" width="300" > > <mx:itemRenderer> > <mx:Component> > <mx:LinkButton rollOverColor="#ffff66" textDecoration="underline" > label="{data.title}" click="{navigateToURL(new URLRequest > (data.url));}" > > </mx:LinkButton> > </mx:Component> > </mx:itemRenderer> > </mx:DataGridColumn > > ####### > > I'm not sure how to access the column data that I want to use with > SortField. > > ###### > var sort:Sort = new Sort(); > sort.fields=[new SortField("?")]; > masterList.dataProvider.sort=sort; > masterList.dataProvider.refresh(); > ######
So you don't have the value "title" in your code but you do have a reference to the item renderer object, right? You can save the field in a variable in the renderer. <mx:Component> <mx:LinkButton ...> <mx:String id="mySortField" value="title" /> </> </> Now from the renderer reference you can simply access the mySortField property and set the value on the sort field while sorting. I hope I understood your problem correctly.