Datagrid Browsing

I was wondering if anyone had any thoughts on this.
I need to import information into a Datagrid and then users
will use the keyboard (no mice on these computers) to arrow over to
the cell that needs edited and hit Enter to edit. (much like Excel)
As far as I can tell this isn't easily accomplished with a
Datagrid. The row highlights fine but I need to highlight by cells.
Thank you for any help

I don't have my code in front of me, but if you search the
docs for "keyboard event" or something along those lines you'll
find what you need. You can add listeners for keyboard events and
then call a function when that key is used.

Similar Messages

  • Problem create DataGrid  on the new browser tab with

    Hello.I work Flex  3 Web application .I have a problem  with about create new browser tab.So that I want to create  DataGrid(with data) on the new browser tab.

    Use JavaScript to do this pointing to your DataGrid application and pass some parameters.

  • How to open a browser link from DataGrid?

    Hello there!
    I have done a simple project. It is just A Lable control and a Datagrid. DataGrid gets all the data from a local xml fiile and displays items lime Tile and category. Selecting an item, it should open a new browser window with a link associated with the Title and Catagory. I am lost in here. I was able to list all data then I don't know how to proceed. see the sameple file please.
    Really appreciate your time and help.
    here is the  file:
    https://rapidshare.com/files/2371961025/sl.zip
    Thank you
    Kristtee

    Hi Mathangi,
    The quick links are designed to be loaded through the home page. That is why the refresh happens for the home page.
    Regards
    Leon

  • How to scroll within a datagrid without the browser window scrolling as well

    Hi,
    I have a datagrid with a vertical scrollbar. When the mouse
    is over the datagrid i'd like to use the mouse wheel to scroll
    through its contents. However when i do this the main browser
    window (which also has a vertical scrollbar) scrolls as well. How
    can i prevent the main browser window from scrolling when the mouse
    is over the datagrid so that only the contents of the datagrid
    scroll?
    Thanks

    I found some javascript code that solves this problem. Credit
    for the code has to go to the person who wrote the excellent
    article at the following link:
    http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel
    If you read this article the code below should make sense.
    From this article i used the hookEvent and cancelEvent
    functions. In my particular case I embed the SWF object inside a
    JSP page using some javascript code. After the SWF is loaded i
    added the following line of code:
    hookEvent('my_swf_id', 'mousewheel', handleMouseWheel);
    where handleMouseWheel is defined as follows:
    function handleMouseWheel(e)
    if (document.getElementById("my_swf_id"))
    document.getElementById("my_swf_id").focus();
    return cancelEvent(e); // This is the key to the solution...
    When the mouse is over the datagrid in the SWF i can use the
    mouse wheel to scroll its contents without the main browser window
    scrolling at the same time.
    Thanks to all who took time to post their ideas, it was
    appreciated.

  • File browsing and showing selected files in a datagrid? i'm missing something small... i hope

    I am currently allowing the user to browse and select multiple files. I'd like to display the selected files in a datagrid. Here's my code. What am I missing?
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                         xmlns:s="library://ns.adobe.com/flex/spark"
                                                         xmlns:mx="library://ns.adobe.com/flex/mx">
      <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <fx:Script>
                        <![CDATA[
                                  import mx.collections.ArrayCollection;
                                  public var Files:File;
                                  [Bindable]
                                  public var arrUploadFiles:Array;
                                  private function init():void
                                            arrUploadFiles = new Array()
                                            Files = new File(); 
                                            Files.addEventListener(FileListEvent.SELECT_MULTIPLE,onSelect_multiple_files); 
                                            Files.browseForOpenMultiple("Select Files to Send!!"); 
                                  public function onSelect_multiple_files(f_evt:FileListEvent):void
                                            for each(var tempF:File  in f_evt.files){ 
                                                      tempF.load(); 
                                                      arrUploadFiles.push(tempF);
                                                      trace (tempF.nativePath);
                        ]]>
      </fx:Script>
              <s:Button x="259" y="454" label="Browse for Files" click="init()"/>
              <s:DataGrid x="159" y="211" requestedRowCount="4">
      <s:columns>
      <s:ArrayList>
                                            <s:GridColumn dataField="dataField1" headerText="Column 1"></s:GridColumn>
                                            <s:GridColumn dataField="dataField2" headerText="Column 2"></s:GridColumn>
                                            <s:GridColumn dataField="dataField3" headerText="Column 3"></s:GridColumn>
      </s:ArrayList>
      </s:columns>
      <s:typicalItem>
                                  <fx:Object dataField1="Sample Data" dataField2="Sample Data" dataField3="Sample Data"></fx:Object>
      </s:typicalItem>
      <s:ArrayList>
                                  <fx:Object dataField1="data1" dataField2="data1" dataField3="data1"></fx:Object>
                                  <fx:Object dataField1="data2" dataField2="data2" dataField3="data2"></fx:Object>
                                  <fx:Object dataField1="data3" dataField2="data3" dataField3="data3"></fx:Object>
                                  <fx:Object dataField1="data4" dataField2="data4" dataField3="data4"></fx:Object>
      </s:ArrayList>
      </s:DataGrid>
    </s:WindowedApplication>

    Arrays do not send out change events so the DG doesn’t know you pushed things onto it.  If you used the DG’s dataProvider it will have wrapped the array in an ArrayCollection and will notice the changes.  There is a FileSystemDataGrid component by the way.

  • Datagrid Image Renderer Broken in CS SDK but not Flex project

    Within a Photoshop Extension, I have a DataGrid which has an inline custom image renderer whose dataprovider is an ArrayCollection called "photos"  representing a list of photos and some metadata properties.  One of the properties "fileName" is concatenated with a path to a thumbnail image such as source="{'LR_AUTO/imported/thumbs/' + data.fileName}".
    The dataprovider is bound to a LCDS DataService. When the extension is first launched, the dataservice initializes the dataprovider with the existing values for the "photos" arraycollection.  The thumbnail images are correctly shown.
    However, when the DataService receives a new row and updates the photos dataprovider, the datagrid's new row shows a broken image for the thumbnail even though the path is correct.  I have dumped the photos dataprovider and verified that all information is correct.  When I close Photoshop and relaunch it from Flash Builder, once again LCDS initializes the photos ArrayCollection and THEN the thumbnail that previously showed as broken show up correctly.
    I have a ColdFusion Directory Watcher Gateway that watches a directory where Lightroom auto-imports images from a tethered capture session.  When the camera sends Lightroom a new image, the new image is processed by Lightroom and moved to a target directory, and since ColdFusion's Directory Watcher is watching that targeted directory, ColdFusion will create a thumbnail image in a subfolder and notifiy LCDS that of the new image and related metadata.
    *** This is the interesting part *** When Lightroom places new images in the target directory, this is propogated to the Photoshop Extension's datagrid, and the new row shows up as described earlier, showing a broken image for the thumbnail.  BUT, instead of Lightroom, if I manually copy images to the folder where ColdFusion is watching, then exact same code path is exectuted and in the Photoshop Datagrid the new row appears and THE THUMBNAIL IMAGE shows up correctly.
    The difference seems to be only in how the images are put in the original target location.  The problem is when Lightroom puts them there, but it works when I put them there as a user.
    *** More Interesting Info *** I have the Flex code for the Photoshop Extension duplicated in a standalone, non-CSSDK project using Flex 3.4 which I launch in a browser.  I have mirrored the code in the Photoshop extension, but in this manner, the problem does not exist.  With plain Flex 3.4 in a browser, whenever LCDS notifies the datagrid of a new photo record, the datagrid's new row ALWAYS shows the thumbnail correctly.
    A primary difference in how the thumbnail image is rendered is that in a browser, the Flex 3.4 project accesses the image assets over the network, however, in the Photoshop Extension, the image asset WITH THE SAME RELATIVE PATH is accessed over the local file system.
    source="{'LR_AUTO/imported/thumbs/' + data.fileName}"
    So in the case of the browser, this path is a relative URL and the image is retrieved over HTTP, however, in the PS Extension, the same path represents a file system path relative to the project folder.
    Unfortunately, because the Flash Player (including APE) cannot access BOTH the network and the local filesystem, so I cannot change the Extension to use network access.
    ** The important part to remember is that when I stop the Flash Builder debug session and close Photoshop, then relaunch the debug with Photoshop, then all the images show up correctly in the Extension.
    Your advice is appreciated.
    Thank you!
    Steve
    ====================================================
    Environment
    ====================================================
    Photoshop CS5 Extended 12.01 x32
    Flash Builder 4
    CS SDK 1.02
    Extension Builder SDK 3.4
    MacBook Pro / OS X 10.5 / Intel Core 2 Duo 2.66 GHz / Procs: 1 / Cores: 2 / Memory: 8 GB
    App configured for Photoshop CS5 and Photoshop CS5 Extended
    ====================================================
    NewsAgencyPhotoshop.mxml
    ====================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="com.stevenerat.news.*"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="0"
                    layout="vertical" horizontalAlign="left"  backgroundColor="#353535"
                    historyManagementEnabled="false"
                    creationComplete="init();">
        <mx:Script>
                public function handlePhotoClick(data:Object):void {
                    this.PreviewImageWindow = PreviewImage(PopUpManager.createPopUp(this,PreviewImage,true));
                    var filePath:String = data.dirPath + data.fileName;
                    PreviewImageWindow.addEventListener("imageOpenEvent",imageOpenListener);
                    PreviewImageWindow.addEventListener("imageCloseEvent",imageCloseListener);
                    PreviewImageWindow.addEventListener("imageSavedEvent",imageSaveListener);
                    PreviewImageWindow.setFileName(data.fileName);
                    PreviewImageWindow.setFilePath(filePath);
                    PreviewImageWindow.y = 0;
                    PreviewImageWindow.x = 0;
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="photos"/>
        <NewsPhoto/>
        <mx:DataService id="ds" destination="NewsAgencyPhotos" autoSyncEnabled="true" autoCommit="true" conflict="conflictHandler(event)"/>
        <mx:Label text="News Agency Photos" fontSize="20" paddingBottom="30"/>
        <mx:Label text="Available Images" fontSize="15"/>
        <mx:DataGrid id="photoIPTC" dataProvider="{photos}" editable="true" width="220" rowCount="5" rowHeight="75" wordWrap="true">
            <mx:columns>
                <mx:DataGridColumn headerText="id" dataField="fileName" width="40" editable="false" sortDescending="true"/>
                <mx:DataGridColumn dataField="psLock" width="65" headerText="Status" editable="false" editorDataField="value">
                    <mx:itemEditor>
                        <mx:Component>
                            <mx:ComboBox editable="false">
                                <mx:dataProvider>
                                    <mx:String>New</mx:String>
                                    <mx:String>Open</mx:String>
                                    <mx:String>Edited</mx:String>
                                </mx:dataProvider>
                            </mx:ComboBox>
                        </mx:Component>
                    </mx:itemEditor>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    ====================================================
    A DUMP OF THE DATAPROVIDER
    in this case, one array item existed when launched, then a second was added
    while running.  The first has its thumbnail show, the second item has broken image
    ====================================================
    ------------------DUMP----------------------------
    (mx.collections::ArrayCollection)#0
      filterFunction = (null)
      length = 2
      list = (mx.data::DataList)#1
        fillParameters = (Array)#2
        length = 2
        localItems = (Array)#3
          [0] (com.stevenerat.news::NewsPhoto)#4
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_162.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 1
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
          [1] (com.stevenerat.news::NewsPhoto)#5
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_163.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 2
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
        uid = "8BAC025E-60D1-11F1-3654-44BDB0D218CE"
        view = (mx.collections::ArrayCollection)#6
          filterFunction = (null)
          length = 2
          list = (mx.data::DataList)#1
          sort = (null)
          source = (null)
      sort = (null)
      source = (null)
    ------------------END_DUMP------------------------

    I expected that if my extension uses the local filesystem AND the network that I would get a Security Sandbox Exception as I recently described in this thread:
    http://forums.adobe.com/thread/791918?tstart=0
    However, I just tried changing my datagrid image renderer to access the thumbnail via HTTP and the thumbnail issue after Lightroom export does not happen.
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'http://localhost:8500/LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
    Furthermore, I can also open the image via the Photoshop DOM, and it does open correctly.  It seems that I do have a solution now, although I'm not certain as to why I'm not getting a Security Sandbox Exception as I described in the other post.
    Thanks for reading.

  • Opening New Browser window for click event on an image

    hi all,
    I want someone to help me out solving the problem of opening
    a new browser window on the mouse click event of an image or a
    button etc.... The new window would contain the datagrid details
    from the main window, but in an expanded form. If at all there is a
    solution, I even want to know whether there is anyway for sizing
    the poped up window,because I dont want the new poped up window to
    cover the entire screen.
    For getting better idea of my problem, the best example I
    could give is the popup window that appears when we click on the
    preview button while posting the message to the forum.
    Someone please do help me out in this regard.
    Thanks,
    amar.

    I'd definitely try to use a Flex popup... but the
    flash.net.navigateToURL method is a simple way to open a popup
    window in a new browser. You can pass any data needed by the new
    page using the URLRequest and/or URLVariables. The URL you navigate
    to could, of course, be another Flex application if necessary. I
    use this only when I need to open a popup window on another site,
    or an HTML formatter report or something similar.
    Concerning yourself with the size of the popup window may be
    a bad design choice also. I, for example, have my browser
    configured to open all popups in a new tab regardless of sizing
    constraints imposed by the designer. If it is absolutely necessary
    for you to have control over the size of your popup window, you
    should follow the advice given by others and use a Flex
    popup.

  • HTTPService not reading updated xml, i've been having to refresh the xml in my browser manually

    I am calling an HTTPService (id=data2php) which runs a php
    script which creates an xml doc and puts it on my server. i then
    call another HTTPService (id=feedRequest) which reads the xml doc.
    i then try to populate a datagrid with the lastResult of my
    HTTPService that reads the xml doc. My issue is that that the
    HTTPService which reads the xml doc reads the previous incarnation
    of the xml doc, not the newly created one that my HTTPService
    (data2php) created. i've been manually going to the xml doc in my
    browser and hitting refresh for my feedRequest HTTPService to read
    the updated xml.
    here is the mxml for the httpservice that reads the xml:
    <mx:HTTPService id="feedRequest" url="
    http://cfcdi.org/eric/dashboard/php/sales.xml"
    result="feedResult(event)" resultFormat="xml" useProxy="false"/>
    pretty straight forward.
    (actually, once in a while it will read the updated
    one)

    LittleMuscle,
    Instead of binding to the lastResult property, I would
    explicitly handle the result and fault events of the HTTPService
    (the one that reads the newly created xml doc) and then manually
    update an XMLListCollection for use as the datagrid's dp. That way,
    you can at least walk through the debugger and see what's going on,
    and force the second HTTPService to read only when you're sure the
    newly created doc is ready.
    Since you said it works sometimes and not other times, it
    sounds like it's just a timing problem, sometimes the xml doc is
    created quickly enough that the HTTPService grabs the new xml doc,
    but if not, it's grabbing the old one. That would be my
    guess.

  • Flash 2.0 Datagrid component bug ?

    Recently I found a bug in Datagrid component. The swf file
    which contain datagrid act differely in IE 6, and IE 7.
    This is what I've done:
    1) Compile swf, export it together with html file.
    2) Run the html file
    3)Press on one of the cell,drag it and then release it
    outside of the browser/flash canvas.
    4)Move the mouse pointer back to flash canvas
    5)The grid will scroll automatically( move the move up and
    down to test)
    6)After a few times mouse pointer movement, suddenly IE
    crash, CPU usage 100%
    I have tested the swf file on firefox 2.007 and stand alone
    flash player, however, none of the flash player have this bug.
    Therefore I suspect that the ActiveX flash plugin for IE cause this
    bug.
    This is the source code, which I use to create the datagrid
    for testing.
    ps: open one fla file, drag datagrid component from component
    panel to the stage or it will not run.
    import mx.controls.DataGrid;
    var header = "Stock Code/\nName,Type,Status,Order
    Date\nTime,Duration,OrderQty/\nPrice,Matched Qty/\nPrice,Trd
    Curr/\nMatched Value,Account No/\nOrder No";
    var wid =
    "90,43.2699356842522,91.5969497381748,87.4747020181826,60.4473499934867,67.9851014914014, 90.2231829093762,111.8984058876167,134.104372277509";
    var alig = "left ,left, left , left , left , right , right ,
    right , left ";
    var halig = "center ,center,center , center , center , center
    , center , center , center ";
    var fxdata:Array = new Array();
    fxdata[0]= new Array("67676
    GPACKET","Buy","Expired","05/09/2007 06:04:20 PM","Day","200
    4.34","0 0.00","MYR 0.00","423423423432");
    fxdata[1]= new Array("054066
    FASTRAK","Buy","Expired","05/09/2007 01:45:18 PM","Day","47,900
    0.27","0 0.00","MYR 0.00","fdsfsdfsdf");
    fxdata[2]= new Array("737013
    HUBLINE","Sell","Expired","05/09/2007 11:53:19 AM","Day","400
    0.69","0 0.00","MYR 0.00","93743");
    fxdata[3]= new Array("31474
    L&G","Buy","Expired","03/09/2007 11:35:35 AM","Day","500
    0.70","0 0.00","MYR 0.00","389dskjfsd");
    fxdata[4]= new Array("38182
    GENTING","Buy","Expired","28/08/2007 11:38:59 AM","Day","500
    7.35","0 0.00","MYR 0.00","90sklsdakl");
    fxdata[5]= new Array("05005
    PALETTE","Buy","Expired","28/08/2007 11:08:23 AM","Day","500
    0.115","0 0.00","MYR 0.00","jsdaflk;as");
    fxdata[6]= new Array("093082
    GPACKET","Buy","Expired","27/08/2007 03:49:43 PM","Day","300
    3.82","0 0.00","MYR 0.00","jsdafj;sda");
    fxdata[7]= new Array("644769
    KELADI","Buy","Expired","27/08/2007 11:05:36 AM","Day","10,000
    0.30","0 0.00","MYR 0.00","jsadjf;lkdas");
    fxdata[8]= new Array("676653
    KASSETS","Buy","Expired","24/08/2007 06:15:33 PM","Day","500
    2.93","0 0.00","MYR 0.00","jlsdf;adas");
    fxdata[9]= new Array("473323
    JAKS","Buy","Expired","23/08/2007 04:45:03 PM","Day","100 0.915","0
    0.00","MYR 0.00","jjkljsdlfasd");
    fxdata[10]= new Array("03069
    IPOWER","Buy","Expired","22/08/2007 10:18:01 AM","Day","9,800
    0.365","0 0.00","MYR 0.00","jlajsd;lfjads");
    fxdata[11]= new Array("05025
    LNGRES","Buy","Expired","21/08/2007 03:08:06 PM","Day","9,900
    0.28","0 0.00","MYR 0.00","jlkjsdafl");
    fxdata[12]= new Array("01308 N2N","Buy","Expired","21/08/2007
    10:34:51 AM","Day","200 1.71","0 0.00","MYR 0.00","mjkjadsflasd");
    fxdata[13]= new Array("70069
    IPOWER","Buy","Cancelled","21/08/2007 10:02:08 AM","Day","0
    0.37","0 0.00","MYR 0.00","jkjasd;fsda");
    fxdata[14]= new Array("03069
    IPOWER","Buy","Cancelled","20/08/2007 07:20:54 PM","Day","0
    0.38","0 0.00","MYR 0.00","jkjsdlkfjsdaf");
    fxdata[15]= new Array("12651
    MRCB","Buy","Replaced","20/08/2007 05:31:59 PM","Day","900 2.35","0
    0.00","MYR 0.00","upuewoirwe");
    var mdtgrid:DataGrid;
    _root.createEmptyMovieClip("displayobj1",
    _root.getNextHighestDepth(),{_x:0,_y:0});
    initial();
    function initial(){
    _root.mdtgrid =
    _root.createClassObject(mx.controls.DataGrid, "xxx",
    _root.getNextHighestDepth());
    _root.mdtgrid.doLater(_root,"setData");
    function setData(){ //insert data to datagrid
    var temp:Array = new Array();
    for (var i in _root.fxdata){
    temp
    = new Object();
    for (var j in _root.fxdata){
    temp
    [j] = _root.fxdata[j];
    _root.mdtgrid.dataProvider =temp;
    _root.mdtgrid.doLater(_root,"setdgStyle");
    function setdgStyle(){
    var rowhight = 40;
    var noofrow = 8;
    var headerheight = 35;
    var gridheight = (rowhight * noofrow) + headerheight ;
    _root.mdtgrid.setSize(800, gridheight);
    _root.mdtgrid.rowHeight =rowhight;
    _root.setHeader(_root.header.split(","));
    _root.setWidth(_root.wid.split(","));
    _root.setAlign(_root.alig.split(","));
    _root.mdtgrid.invalidate();
    function setHeader(datasource:Array){ //set header label
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    _root.mdtgrid.getColumnAt(i).headerText = datasource
    function setWidth(datasource:Array){ //set columns width
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    _root.mdtgrid.getColumnAt(i).width = Number(datasource);
    function setAlign(datasource:Array){ //set Alignment
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    temp = _root.mdtgrid.getColumnAt(i);
    temp.setStyle("textAlign",trim(datasource

    Anyone know how to fix it ?

  • How do make the mouse wheel scroll in my Flex app/component instead of the browser?

    Let's say I have a DataGrid or Tree or List component which
    has hundreds of rows. When I place my mouse over the component and
    scroll the mouse wheel, I notice that [most of the time] it scrolls
    the component a little, then starts scrolling the browser window. I
    want it to only scroll the component until it reaches the end of
    the rows. Any thoughts?

    I have confronted the same issue.
    Was anybody able to solve it?
    I think mx.contorols.TextArea seems to do well.

  • How to display data from local csv files (in a folder on my desktop) in my flex air application using a datagrid?

    Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
        <mx:Label x="280" y="19" text="1. Select Purchase Order"/>
        <mx:List y="45" width="232" horizontalCenter="0"></mx:List>
        <mx:Label x="158" y="242" text="2. Verify Information"/>
        <mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
        <mx:Label x="355" y="606" text="3. Generated PDF"/>
        <mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
    </mx:WindowedApplication>

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

  • How to update 2 datagrids in 2 different app at the same time?

    I'm very new to flex/flash builder and my question is: first I have to explain how the applications works. The first applications have a form for a customer to fill and datagrid to show the results.The data is send using PHP to a database in the server. The second application have a datagrid for the admin  that show the data that the first application send. Now, when  the data is inserted in the database, the first application dataGrid show the result soon as the records are inserted in the database, but the second application show the records after I refresh the Browser. The second aplication have a delete button to clear records from the database as is obious, the firstt database needs to be refreshed in order to see if the record has been deleted. So what I need is that both applications update as soon as the database is altered.If anyone have a suggestion I appreciate very much thanks in advance.

    Then, the time interval should be implemented in both applications since the first one inserts data and the second one delete the data. Instead of doing time interval I eliminate the second app and make 'states' in the first app for the 'add' and 'delete' data so I was able to open two instances of the app, one using the add state and the other with the delete state thinking that since was the same application both update at the same time but unfortunately I was wrong and one needs the browser refresh anyway. I really not know how to do time interval in flex since is different to flash that you just do the interval for the next frame and back to the first to load the data since is a timeline based app, flex not, besides, I'm just start using flex a couple weeks ago and don't know much about the coding  but I will keep researching to do that. Thanks for the advice and sorry to take so long to answer.

  • Flex 3: DataGrid Column width on resize

    Hello experts,
    I am facing an issue with width of DataGrid columns. We are using Flex 3.2.
    I am setting the widths for columns in creationComplete handler of DataGrid. When the browser window is resized, say restore down and then maximize,
    the column widths are changing. Please find the code below:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="100%" width="100%">
    <mx:Script>
        <![CDATA[
            import mx.core.ScrollPolicy;
            [Bindable]
            private var isVisible:Boolean = true;
            private function creationCompleteHandler():void{
                dataGrid.horizontalScrollPolicy = ScrollPolicy.ON;
                artist.width = dataGrid.width * 0.40;
                album.width = dataGrid.width * 0.50;
                Price.width = dataGrid.width * 0.10;
                dataGrid.horizontalScrollPolicy = ScrollPolicy.OFF;
        ]]>
    </mx:Script>
    <mx:DataGrid id="dataGrid" width="80%" height="100%" creationComplete="creationCompleteHandler()">
          <mx:ArrayCollection>
             <mx:Object Artist="Pavement" Price="11.99"
                Album="Slanted and Enchanted" />
             <mx:Object Artist="Pavement"
                Album="Brighten the Corners" Price="11.99" />
          </mx:ArrayCollection>
          <mx:columns>
              <mx:DataGridColumn id="artist" dataField="Artist"/>
             <mx:DataGridColumn id="album" dataField="Album" visible="{isVisible}"/>
             <mx:DataGridColumn id="Price" dataField="Price" />
          </mx:columns>
       </mx:DataGrid>
    </mx:Application>
    Is there anything wrong i am doing here? Please help me in resolving this.
    Thanks,
    Srilatha

    Hi Srilatha,
    DataGrid width is 100% and the main application width also 100%, So the
    DataGrid will try to occupy the whole window, when you do "restore down" &
    "maximize" Application width will change.. and it will effect DataGrid and
    its columns also. Try to give some fixed width for dataGrid and you can
    expect the result.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    height="100%" width="100%">
        <mx:Script>
            <![CDATA[
                import mx.core.ScrollPolicy;
                private var isVisible:Boolean = true;
                private function creationCompleteHandler():void
                    dataGrid.horizontalScrollPolicy = ScrollPolicy.ON;
                    artist.width = dataGrid.width * 0.40;
                    album.width = dataGrid.width * 0.50;
                    Price.width = dataGrid.width * 0.10;
                    dataGrid.horizontalScrollPolicy = ScrollPolicy.OFF;
            ]]>
        </mx:Script>
        <mx:DataGrid id="dataGrid" width="500" height="100%"
    creationComplete="creationCompleteHandler()">
            <mx:ArrayCollection>
                <mx:Object Artist="Pavement" Price="11.99"
                           Album="Slanted and Enchanted" />
                <mx:Object Artist="Pavement"
                           Album="Brighten the Corners" Price="11.99" />
            </mx:ArrayCollection>
            <mx:columns>
                <mx:DataGridColumn id="artist" dataField="Artist"/>
                <mx:DataGridColumn id="album" dataField="Album"
    visible=""/>
                <mx:DataGridColumn id="Price" dataField="Price" />
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    Thanks
    Pradeep Reddy

  • Open a new browser window to show document

    Hi,
    I am trying to click an item in datagrid to open a new
    browser window and display the document for this selected item. how
    to implement it? thank you.

    Here is a full example that should do what you are asking.
    You need to create an itemRenderer for your DataGrid.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    backgroundAlpha="0" >
    <mx:Script>
    <![CDATA[
    import mx.collections.*;
    private var catalog:ArrayCollection;
    private static var contacts1:Array = [
    {URL: "
    http://www.macromedia.com/software/dreamweaver/",
    Product: "Dreamweaver"},
    {URL: "
    http://www.macromedia.com/software/flash/",
    Product: "Flash"},
    {URL: "
    http://www.macromedia.com/software/coldfusion/",
    Product: "ColdFusion"},
    {URL: "
    http://www.macromedia.com/software/flex/",
    Product: "Flex"},
    {URL: "
    http://www.macromedia.com/software/breeze/",
    Product: "Breeze"},
    {URL: "
    http://www.macromedia.com/software/director/",
    Product: "Director"}
    private function initCatalog(cat:Array):void
    catalog = new ArrayCollection(cat);
    myDatagrid.dataProvider = catalog;
    public function generateHtml(url:String):String {
    return '<a href="'+url+'"
    target="_blank">'+url+'</a>';
    ]]>
    </mx:Script>
    <mx:Text text="This example uses a Text itemRenderer for
    the second column that
    changes the font color of those cells and uses the htmlText
    property of Text
    to make the cell a link." width="350" />
    <mx:DataGrid id="myDatagrid" width="600" height="300"
    creationComplete="initCatalog(contacts1)" >
    <mx:columns>
    <mx:DataGridColumn dataField="Product" />
    <mx:DataGridColumn dataField="URL" width="400">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Text color="0x0000FF"
    htmlText="{outerDocument.generateHtml(data.URL)}"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    Joan Lafferty
    Flex SDK QA

  • PLEASE HELP!! Need some way to read header text in advanced datagrid using QTP

    I am writing a function to read column names in advanced data
    grid. There is no operation for that and any of the properties that
    I can use to read the column names.
    Please suggest any way that I can get the names of columns in
    the advanced data grid.
    Thanks

    I hope to hear something from adobe folks...I am providing
    more info.....
    I am using QTP 9.2 and Flex 3 add-in available from Adobe.
    My application has flex Advanced datagrid object and I am
    trying to read column names for the datagrid.
    I have contacted developers and they told me that column
    names for flex advanced datagrid are stored in "Header Text"
    I have tried reading "Header Text" using
    GetROProperty("HeaderText") but it doesn't return anything.
    I have tried the following code:
    x =
    Browser("app").FlexApplication("flexapp").FlexCanvas("Canvas").FlexAdvancedDatagrid("esti mategridid").GetROProperty("Header
    Text")
    msgbox x
    I have also tried getting value for column names using other
    available properties for webtables like outerhtml, outertext, alt
    etc. but I don't get any data.
    Part of the problem may be because none of the above
    mentioned properties are supported by Flex Advanced datagrid.
    I have also tried getting child objects but I always get the
    data in datagrid as values but not the column names.
    My primary reason for getting column names is to write a
    function to update cell in datagrid independent of application. So,
    I want to pass column name as a parameter to the function and get
    the corresponding columnIndex in the function by comparing the
    parameter value against column names.
    Thanks to all for you help...

Maybe you are looking for

  • Navigating from Summary Report to Detail Report in OBIEE 11g

    Hi, I have creted two reports.One corresponds to Summary and the other Detail.By clicking on one of the fields in the Summary report the values are captured and then the detail report is displayed based on the values selected. Now,What I need to know

  • Parameter for Query to prevent automatic execution when broadcast to portal

    When our users open a Portal folder the first query is automatically executing.   We are using a PCD Subfolder structure.   Does anyone know of a parameter that can be set that requires the user to select the query to execute.   See structure below F

  • Error Message when trying to download

    Please advise. "Firefox doesn't know how to open this address, because the protocol (aam) isn't associated with any program".

  • Compile error in hidden module: module starter  (Urgent)

    Hi Experts, I am trying to logon to my word document template which was working fine before and now i am getting the error compile error in hidden module: module starter any advise or help can be greatly appreciated. I am using word 2010 and OBIEE ve

  • X-Fi Softw

    Hi All,?I've bought a X-Fi XtremeMusic a year ago, Now I've bought a new PC and place the card in it. However I've lost all CD that came with it when I bought the card. The drivers I can download, so that not a problem, but I used to have a program w