2 Replies Latest reply on Nov 4, 2010 12:19 PM by Peter deHaan

    How to freeze a column in dataGrid?


      How to freeze one (or more) column (s) in datagrid, when it roll right, when you have too many columns in datagrid?

      I thank you for help: THANK YOU!


        • 1. Re: How to freeze a column in dataGrid?
          iamcootis Level 1

          Not entirely sure what you're asking, but you may want to use the AdvancedDataGrid and set the lockedColumnCount property. This will keep you from being able to rearrange a set number of columns starting from the left.

          • 2. Re: How to freeze a column in dataGrid?
            Peter deHaan Level 4

            You can also set the lockedColumnCount property in the mx:DataGrid as well:


            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                <mx:DataGrid id="dg3" lockedColumnCount="1" horizontalScrollPolicy="auto" width="300">
                            <mx:Object c1="1" c2="one" c3="ONE" c4="OnE" c5="The quick brown" /> 
                            <mx:Object c1="2" c2="two" c3="TWO" c4="tWo" c5="Fox jumps over" /> 
                            <mx:Object c1="3" c2="three" c3="THREE" c4="ThReE" c5="The lazy dog" />