Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to get a horizontal  scroll bar for a DataGrid

Posted on 2010-01-05
3
Medium Priority
?
794 Views
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="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
      <![CDATA[
            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:Script>
<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')}"/>
                  
            
      </mx:DataGrid>
      </mx:Canvas>
</mx:Application>
0
Comment
Question by:vmarada
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 1500 total points
ID: 26188463
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:
1) http://www.jonnyfunfun.com/2008/11/11/flex-advanceddatagrid-datagrid-optimizicator/
2) http://viconflex.blogspot.com/2006/12/autosizing-datagrid-with-horizontal.html
I think you might find a working solution.
0
 

Author Closing Comment

by:vmarada
ID: 31672947
good
0
 
LVL 37

Expert Comment

by:zzynx
ID: 26590354
Thanx 4 axxepting
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Often, the users face difficulty in accessing Outlook 2016 PST files on Windows 10 computer. One of the reasons behind it is the improper functioning of MS Outlook when the user tries to open it. MS Outlook suddenly stops working, or it will not op…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

580 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