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>

On 4/17/06, Brendan Meutzner <[EMAIL PROTECTED] > wrote:

Thanks Matt.



On 4/17/06, Matt Chotin < [EMAIL PROTECTED]> wrote:

Sorry, I can't see it in B2.  In B3 you'll be able to set draggableColumns="false" .

 


From: [email protected] [mailto:[email protected]] On Behalf Of Brendan Meutzner
Sent: Monday, April 17, 2006 8:50 PM
To: [email protected]
Subject: [flexcoders] Column Reorder

 

Hi All,

Is there a way to disable the ability to change the display order (horizontal) of datagrid columns?


Brendan



--
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

 

 


 



--
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

 

 






--
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




Reply via email to