How to get a horizontal  scroll bar for a DataGrid

Posted on 2010-01-05
Last Modified: 2012-05-08
In my datagrid i have 2 columns only.One column contains more(above 500) characters at that time iam not getting horizontal scroll to view the full data.

Below is the code which iam using:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute" creationComplete="init()">
            import mx.collections.ArrayCollection;
            private function init():void
                  var array:ArrayCollection = new ArrayCollection();
                  array.addItem({errorCode: "World of Warcraft",sourceRecord: "ddddddddddddddddddddddsssssssssssssssssssssssssssssssseeeeeeeesdffffffffffffffffffffffffffffffdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeee"});
            dgFilteredCount.dataProvider = array;
<mx:Canvas id="emailCanvas" width="100%"  >

      <mx:DataGrid id="dgFilteredCount" automationName="dgFilteredCount"
              width="100%"  horizontalScrollPolicy="on"
             height="355"  >
                  <mx:DataGridColumn id="errorCode" dataField="errorCode" minWidth="50"  color="black" headerText="{resourceManager.getString('locale', 'listManager.filters.ErrorCode')}"/>
                  <mx:DataGridColumn id="sourceRecord" dataField="sourceRecord" minWidth="50"  color="black" headerText="{resourceManager.getString('locale', 'listManager.filters.SourceRecord')}"/>
Question by:vmarada
    LVL 37

    Accepted Solution

    You don't get a scroll bar because your column is NOT as wide as your text is by default.

    If you combine those two ideas:
    I think you might find a working solution.

    Author Closing Comment

    LVL 37

    Expert Comment

    Thanx 4 axxepting

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now