Not sure, that logic has changed a little
I think. I think you’ll be able to figure out what you need to do in B3
though.
From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Ortega
Sent: Tuesday, April 18, 2006
11:10 AM
To: [email protected]
Subject: Re: [flexcoders] Column
Reorder
The code below works in that
they don't reorder, even though it looks like it's going to.
I have a question though while trying to figure
this out (cuz I need it too), I saw this:
at
mx.controls::DataGrid/http://www.adobe.com/2006/flex/mx/internal::shiftColumns
()
at
mx.controls::DataGrid/::columnDraggingMouseUpHandler()
Matt, is there any way to access, override or
inactiviate those functions?
Here's the hack to keep the sort:
*************
<?xml version=" 1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" creationComplete="init()">
<mx:Script>
import mx.events.DataGridEvent;
private var origArr:Array = new Array({Name:'Some Product',Price:'$1.44'});
public function init():void
{
dg1.addEventListener("headerShift",hsFunct);
dg1.addEventListener("focusIn",deFunct);
}
public function deFunct(e:Event):void
{
origArr = dg1.columns;
}
public function hsFunct(e:Event):void
{
dg1.columns = origArr;
dg1.invalidateDisplayList();
}
</mx:Script>
<mx:DataGrid
id="dg1" dataProvider="{origArr}" />
</mx:Application>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
|