List of subdirectories in DataGrid

I'm trying to list the files and subdirectories in a DataGrid and when the user clicks on a content directory to the directory displayed in the DataGrid control. I got the directories in the list but cannot get them to open.








....



The listHandler is supposed to detect whether the event.target is a directory or not, and if it is to replace the contents of the DataGrid with the contents of the target.

Yes, it's fake.  The 'target' is always the object generating the event.  So in your event sink, you need to:

var currentFile:File = this.list.selectedItem.file as a file;

Tags: BlackBerry Developers

Similar Questions

  • List of subdirectories look very different after going to the backup catalog

    My catalog has been corrupted and I decided to go to my last backup. But when I look at the subdirectories where the pictures are stored, there is a name for the directory. Join also, like on the screenshot, all images are not displayed in the grid until it is clicked on.Screen Shot 2015-10-21 at 2.38.02 PM.png

    I just want to add here that my catalog was not bad. I've deleted and reinstalled Lightroom 2015 CC and everything's fine, almost, but I'll start a new thread about this.

  • List ComboBox ItemEditor

    I was told to use a list instead of a DataGrid control when there is a single object in my dataprovider list and that only one column is required even if this object is a complex object.  In the DataGrid the point editor wanted to return the value to a data area and since there was no datafield he gave me trouble.  Now, I'm trying to implement this in a list.  However, FB gives me a hard time with the ItemEditor and when I search on how to implement an editor of point I find many examples on the Datagrids and if there is an example of a list that they reference editor but never the code on the way it has been implemented.  So, someone please provide an example of how to implement a point for a spark list editor.

    It turns out that also, I forgot the data field of the editor.  Maybe its time to go back and remember some of these little things I learned when I started flex for learning that I forgot now.

  • DataGrid itemRenderer/itemEditor trouble

    I have a datagrid in a Flex project, the data grid is a XML as a source (see content below), now because of the way it is formatted (I can't change that) some of the data I want to display is inside a tag that is not at the level of the original table. Here is the file:

    <?xml version="1.0" encoding="utf-8" ?>
    <Categories>
     <Category>
      <CategoryName>Cat 1</CategoryName>
      <CategoryLink>http://www.google.com</CategoryLink>
      <CategoryData>
       <CategoryDescription>This is the description of category 1</CategoryDescription>
       <CategoryHeader>My Category Title 1</CategoryHeader>
       <CategoryNumber>1</CategoryNumber>
      </CategoryData>
     </Category>
    </Categories>
    

    I need to display CategoryData.CategoryDescription, CategoryData.CategoryNumber, CategoryLink and CategoryName.

    Now blindly, I abandoned the datagrid control in the project and he bound to the data source, I get the following returned for CategoryData:

    [object CategoryData_type]

    Not much use, but with what appears to be a hack I changed the column code read the dataField = "CategoryData.CategoryDescription" and Hooray it works. " I didn't know that at the time that it was bad, and when I passed an itemEditor things was wrong. When the datagrids load they display the correct data, but then when you try to change the child property fields you get the following error:

    ReferenceError: Error #1069: CategoryData.CategoryDescription property not found on valueObjects.Category_type and there is no default value.

    I looked towards the top of the error and I realize that this means that there is no value for CategoryData.CategoryDescription, but if I can display it why can I not change! What should I do to make this work?

    In any case, here's the code, it shows the default bound datagrid, a second datagrid with the applied hack, and a third hacked datagrid with itemRenderer and itemEditor on the number of columns

    Can you please take a look and tell me what I got wrong, more to the point, if there is a doc that explains how to deal with XML then this point please me home.

    I tried to change the return type for ONE of the columns, but it does not work, I also tried a labelFunction, but once again, I can get [object CategoryData_type] to display, but I get like the datagrid load null reference exception if I try to make the child accessories.

    Here is the Flex code:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx"
          xmlns:categories="services.categories.*"
          minWidth="955" minHeight="600">
     <fx:Script>
      <![CDATA[
       import mx.controls.Alert;
       import mx.events.FlexEvent;
       
       protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
       {
        getDataResult.token = categories.getData();
       }
       protected function lftest(item:Object, column:GridColumn):String
       {
        var t:String = item.CategoryData;
        return t;
       }
      ]]>
     </fx:Script>
     <fx:Declarations>
      <s:CallResponder id="getDataResult"/>
      <categories:Categories id="categories"
              fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
              showBusyCursor="true"/>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <s:DataGrid id="dataGrid" x="10" y="10" width="684"
        creationComplete="dataGrid_creationCompleteHandler(event)" editable="true"
        requestedRowCount="4">
      <s:columns>
       <s:ArrayList>
        <s:GridColumn width="100" dataField="CategoryName" headerText="CategoryName"></s:GridColumn>
        <s:GridColumn width="100" dataField="CategoryLink" headerText="CategoryLink"></s:GridColumn>
        <s:GridColumn width="180" dataField="CategoryData" headerText="CategoryData"></s:GridColumn>
       </s:ArrayList>
      </s:columns>
      <s:typicalItem>
       <fx:Object CategoryData="CategoryData1" CategoryLink="CategoryLink1"
            CategoryName="CategoryName1"></fx:Object>
      </s:typicalItem>
      <s:AsyncListView list="{getDataResult.lastResult}"/>
     </s:DataGrid>
     <s:DataGrid id="dataGrid2" x="10" y="147" width="684" editable="true" requestedRowCount="4">
      <s:columns>
       <s:ArrayList>
        <s:GridColumn width="100" dataField="CategoryName" headerText="CategoryName"></s:GridColumn>
        <s:GridColumn width="100" dataField="CategoryLink" headerText="CategoryLink"></s:GridColumn>
        <s:GridColumn width="180" dataField="CategoryData" headerText="CategoryData"></s:GridColumn>
        <s:GridColumn dataField="CategoryData.CategoryDescription" headerText="Desc"></s:GridColumn>
        <s:GridColumn dataField="CategoryData.CategoryHeader" headerText="Head"></s:GridColumn>
        <s:GridColumn dataField="CategoryData.CategoryNumber" headerText="Num"></s:GridColumn>
       </s:ArrayList>
      </s:columns>
      <s:typicalItem>
       <fx:Object CategoryData="CategoryData1" CategoryLink="CategoryLink1"
            CategoryName="CategoryName1"></fx:Object>
      </s:typicalItem>
      <s:AsyncListView list="{getDataResult.lastResult}"/>
     </s:DataGrid>
     <s:DataGrid id="dataGrid3" x="10" y="284" width="684" editable="true" requestedRowCount="4">
      <s:columns>
       <s:ArrayList>
        <s:GridColumn width="100" dataField="CategoryName" headerText="CategoryName"></s:GridColumn>
        <s:GridColumn width="100" dataField="CategoryLink" headerText="CategoryLink"></s:GridColumn>
        <s:GridColumn width="180" dataField="CategoryData" headerText="CategoryData"></s:GridColumn>
        <s:GridColumn headerText="Number">
         <s:itemRenderer>
          <fx:Component>
           <s:GridItemRenderer>
            <s:NumericStepper value="{data.CategoryData.CategoryNumber}" />
           </s:GridItemRenderer>
          </fx:Component>
         </s:itemRenderer>
        </s:GridColumn>
        <s:GridColumn dataField="CategoryData.CategoryNumber" headerText="Number">
         <s:itemEditor>
          <fx:Component>
           <s:GridItemEditor>
            <s:NumericStepper value="{data.CategoryData.CategoryNumber}" />
           </s:GridItemEditor>
          </fx:Component>
         </s:itemEditor>
        </s:GridColumn>
       </s:ArrayList>
      </s:columns>
      <s:typicalItem>
       <fx:Object CategoryData="CategoryData1" CategoryLink="CategoryLink1"
            CategoryName="CategoryName1"></fx:Object>
      </s:typicalItem>
      <s:AsyncListView list="{getDataResult.lastResult}"/>
     </s:DataGrid>
    </s:Application>
    

    Any advice welcome.

    Shaine

    Another suggestion that I will try to a blog post from Hillel Coren

    http://hillelcoren.com/2008/09/21/Flex-Tip-convert-XML-to-ArrayCollection/

    
    
    
        
            Hello";
                    _data = convertXmlToArrayCollection( file );
                }
    
                private function convertXmlToArrayCollection( file:String ):ArrayCollection
                {
                    var xml:XMLDocument = new XMLDocument( file );
    
                    var decoder:SimpleXMLDecoder = new SimpleXMLDecoder();
                    var data:Object = decoder.decodeXML( xml );
                    var array:Array = ArrayUtil.toArray(data.rows.row);
    
                    return new ArrayCollection( array );
                }
    
            ]]>
        
    
        
    
    
    
  • DataGrid with Delete buttons?

    I want a variable list of items (where the DataGrid) where each element has a button Delete, or link or something that will remove this item from the list. Something like this:

    My list of things
    |----------------------------------------|
    | Point 1 | [delete list] |
    | Point 2 | [delete list] |
    | Point 3 | [delete list] |
    |----------------------------------------|


    I * think * the DataGrid is the starting point, but what I need to design a custom component? Or important something like that already exists? Where should I start? Maybe there's a better way to solve this problem?

    You ant to remove the item from the dataProvider. This code can help:

  • What should I use instead of cellPress in the DataGrid

    It seems that the cellPress event is what you used in AS2.0. I can't find an equivalent function in AS3.0. I got a lot more like that in a non editable dataGrid.

    From Beta 3, you should be able to get the information you want for the itemClick event. This event is available on all elements of list based as TileList, DataGrid, list, etc.

  • WinExplorer a user under 'USERS' disappeared

    Music, Photos, videos, Docs, other directories all disappeared.

    However, with the 'search' under C: I see they all exist and can be loaded, although one by one.

    I can copy any area (hours) in another directory, but the directory structure is lost. There are 88 GB of files!

    How to restore the visibility of this USER under Win Explorer?

    Thus all restore the complete list of subdirectories and content to the breast?

    Hi Mary,

    Welcome to the Microsoft Community and thanks for posting the question.

    This issue could be due to the virus from the system or files and folders are hidden, I suggest trying the following methods and check if it helps.

    Method 1:

    I suggest you to run the Microsoft Safety Scanner and check if there is no virus.

    Microsoft Safety Scanner: http://www.microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again. The data files that are infected can be cleaned by removing the file completely, which means that there is a risk of data loss.

    Method 2:

    I would like to enable Show hidden files.

    Show hidden files: http://windows.microsoft.com/en-US/windows7/Show-hidden-files

    If you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • I can do 2 remote calls at the same time?

    Hello

    I can do 2 remote calls at the same time? For example, if I have the following remote objects:

    "" < mx:RemoteObject id = "myRemote" destination ="zend" source = "MyData" showBusyCursor ="true"fault = "faultListener (event)"> "

    " < mx:method name ="getData"result ="getDataListener (event)"/ >

    < / mx:RemoteObject >

    "" < mx:RemoteObject id = "myRemote2" destination ="zend" source = "MyData2" showBusyCursor ="true"fault = "faultListener (event)"> "

    " < mx:method name ="getData2"result ="getDataListener (event)"/ >

    < / mx:RemoteObject >

    And I call them at the same time:

    public function myFunc (): void {}

    myRemote.getData ();

    myRemote2.getData2 ();

    }

    Will it work? Flex will be "confused" the results of a call with the results of the call on the other? Do I need an AsyncToken? If so, how to use an AsyncToken in the example above?

    Thank you

    -Laxmidi

    I do it all the time. I call the one for control combobox with a list of people, a

    and with these data on people filling a datagrid. Then use the drop-down list to filter the datagrid.

    In your sample well mak result = "getDataListener (event) another" and name it getDataListener2, so there is a separate and a dataprovider for the first to the second. "

    If your going to the same event, the other will replace the first.

    Hope this helps

  • Of HTTPService for ArrayCollection collection

    Hi all

    I practiced on Flex for several weeks, and I really appreciate it. I use it mainly to view BD MySQL data. One thing I can not clearly know is how to transfer data from an XML (accessed by a HTTPService) to an ArrayCollection collection. I tried several methods, it never works.

    This is my last try:


    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;
    Import mx.utils.ArrayUtil;
    []] >
    < / mx:Script >

    "" < mx:HTTPService id = "Liste_XML" url = " http://www.hereismyXMLfile.com/file.php" useProxy = "false" method = "POST" / >

    < mx:ArrayCollection id = source = "{mx.utils.ArrayUtil.toArray (Liste_XML.lastResult.liste.affiche)"arrayfilms"}" / > "

    < mx:DataGrid dataProvider = "{arrayfilms}" creationComplete = "Liste_XML.send ()" width = "500" / > "
    < / mx:Application >

  • DataGrid in list!

    Hi dude...

    I use datagrid inside the list and I am able to bind data in the list and grid. The problem is that I can't all of the data in the DataGrid, its visible to the amount of the length of the list when displaying data in datagrid...

    Thanks in advance...

    If you use mx:List and DG is greater than the list, you will not

    be able to see the rest of the DG, unless you wrap in the scroll bars.

  • List of mysql database tables in DataGrid

    Hello world

    I try to display all Tables availible to a database in a DataGrid control.

    Rather than listing the data in the column, he lists in the first row of the column sperated by comma.
    Please, can someone tell me what I'm doing wrong here?

    Thanks in advance.

    Carpet

    Code so far:

    < mx:DataGrid id = "dgTableListRequest" x = "75" y = "60" dataProvider = "{tableListRequest.lastResult.tablelist}" height = "145" > "

    < mx:columns >

    < mx:DataGridColumn headerText = "Tables" dataField = "table" / >

    < / mx:columns >

    < / mx:DataGrid >

    PHP:

    $Query = 'SHOW TABLES OF words';
    $Result = mysql_query ($Query);

    $Return = "< tablelist > ';
    While ($row = {mysql_fetch_row ($Result))}
    $Return. = "< table >. $row [0]. ' < /table > ';
    }
    $Return. = "" < / tablelist > ";"

    print ($Return);

    This should work:

    
    
            
    
                
    
            
    
        
    
  • How to align list data in datagrid flex HELP?

    Guys it should seem simple to make, but im having a mental block or I am ol simply stupid.

    I get a list of a Web service like this

    1

    1

    1

    1

    1

    but when I want to display the data in the datagrid control

    Like this

    1 1

    1 1

    1 1

    1 1

    I tried to build a feature like this, but I get blank lines. On one of the column in the grid. Im sure there has got to be a way to do this.

    public function Validate(event:ResultEvent):Sub{ }

    list.dataProvider = event.result;

    var count: Number = new Number of ;

    for every()var Point: Object in event.result as collection ArrayCollection)

    {

    Count ++;

    if (count %2 == 0)

    {dataP.addItem({)

    "fwvitals_message" ( : item.fwvitals_message})}

    on the other

    {

    dataP.addItem({)

    "fwvitals_message2" ({ : item.fwvitals_message})

    }

    }

    list.dataProvider = dataP;

    }

    list.dataProvider = event.result;

    var count: Number = new Number of ;

    for every()var Point: Object in event.result as collection ArrayCollection)

    {

    Count ++;

    if (count %2 == 0)

    {dataP.addItem({)

    "fwvitals_message" ( : item.fwvitals_message})}

    on the other

    {

    dataP.addItem({)

    "fwvitals_message2" ({ : item.fwvitals_message})

    }

    }

    list.dataProvider = dataP;

    }

    any help would be greatly appreciated.

    Miguel

    Hello

    Not sure if you are using flexbuilder or flashbuilder but with flashbuilder I find the datagroups are much more flexible than the grids. I experimented with a db of wordpress and FB4 datagroups, for example, the code is attached to this link

    http://flashhub.net/Gumbo/readblog/ - source included

    It uses a datagroup with vertical presentation, but you can also use a tiledlayout with control over the way in which the columns are installed on. The thing to remember lists if you use records (array of items) rather than a single element, you should really use an itemrenderer for each record. The foregoing also uses an element of rendering.

    http://flashhub.net/filter/ - source included

    It is a component tilelist from db data.

    David.

  • Need resources on mx:List, mx:Datagrid, dataProvider in combination with an SQLite result

    Hello

    I'm new to Flex and I try to learn.

    I'm developing an application with a local SQLite. I can do the database, connect to it and get some results with SQLinstructions.

    The problem I have is with this result display.

    1)

    First of all, it's not not clear to me if the returned result is an array or an object. The function is

    private void selectfilesResult(eventObj:Event):void
    {
    selectFiles = eventObj.target.getResult () .data;
    }

    GetResult () .data back what to do...? What is the difference with... getResult() is there a way to know? Is it possible to 'see' objects?

    I think it is important to understand the problem that I have.

    2)

    When I fill the component mx:Datagrid with the dataProvider to sort (dataProvider = "{selectfiles}") and the use of dataField, everything went well: the list is displayed.

    When I try to use the same result with the mx:List component I get some [object Object] as the list that appears.

    When I try to use dataProvider = "{selectfiles.description}" (description is one of the fields) everything is empty.

    What is the difference between dataGrid and list? Can you tell me other resources to digg a little further in the present?

    Thanks in advance,

    Konrad

    You should be able to use the results as for the list and Datagrid. Basically, the two classes deal with the dataProvider in the same way, because the logic for this is defined in their common base class: ListBase. Take a look at the source for ListBase (ctrl + shift + t compared to a window of the editor in FB) and search for "set dataProvider.

    There is an important difference: If you do not specify a column to your datagrid, then it will inspect the first item in its dataProvider and generate a column by property. However, given that the list has no columns, you must specify a labelField or labelFunction so he has something to show.

  • DataGrid itemrenderer rowcount list do not change with the data

    I have a datagrid with an itemrenderer.  the itemrenderer is a list item.  I fill the list with different values for each row in the datagrid control.  It works very well.  However, I would like the list to reset the number of lines for each row in the datagrid control.  This is not the case.  If the first line datagrid list box is 3 rows of each list box in this column is 3 rows no matter what I do.  Here is my code:

    <mx:List xmlns:mx="http://www.adobe.com/2006/mxml" rowCount="1">
    <mx:Script>
      <![CDATA[
       import mx.utils.ObjectProxy;
       import mx.collections.ArrayCollection;
       import mx.utils.ArrayUtil;
      
       [Bindable] private var arr:Array;
         
       override public function set data( value:Object ) : void 
       {
        super.data = value; 
        if(value != null && value.MEET is ArrayCollection)
        {
         var len:Number = value.MEET.length;
         arr = new Array();
         for each (var obj:ObjectProxy in value.MEET){
          arr.push(obj.DAYS);
         }
         this.dataProvider = arr;
         //labelField = "DAYS";
         this.rowCount = len;
        }
        else if (value != null && value.MEET is ObjectProxy )
        {
         this.rowCount = 1;
         this.dataProvider = value.MEET;
         this.labelField = "DAYS";
         
        }
        else
        {
         this.rowCount = 1;
        } 
       }
       
      ]]>
    </mx:Script> 
    </mx:List>

    You have set variableRowHeight = true on the DataGrid control?

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Drop-down lists to DataGrid scrolling through the grid reset

    I have a datagrid that contains two columns with drop-down menus. The drop-down list values are defined by program to the given index. But when the grid scroll bar is made to scroll up and down and then back up the selected values to reset. Any idea of this behavior?

    Yes. point converters are "recycled". Flex creates only for the visible rows. When you scroll, item for item data is scrolled position are sent the converter (through the set data() setter), who must use these data to render its visible state.

    This means that all aspects of the item converter must be controlled by the data. You can't do a data-oriented work to initialize or create complete, but need to override the set data() method. Best practices is actually a little more complicated Quen only. You must place the selectedIndex property of the ComboBox value stored within the item renderer.

    Google: Alex Harui point converter recycling

    For a full explanation and examples.

    Tracy

Maybe you are looking for

  • Parallax does not work anymore

    I created a parallax (scrolling the image maps in layers that tells a story about 10 months ago) or so, it works in all browsers and at this time there, he worked in firefox 10 - ish. I just saw today that it no longer works in Firefox 17 or 16, it d

  • Safari could not download because there is not enough free space on the disk

    Safari could not download the file 'MacKeeper.3.9.1.pkg' because there is not enough disk space

  • Re: Room Temperature for Satellite A100-999

    Hi all I have a Toshiba Satellite A100-999 (old lil :/) with XP I was wondering what are the temperature ranges at low, medium or high performance for the motherboard and CPU. at the present time about the temperature I have are: (Celsius)Motherboard

  • WPF object linking

    Hello I would like to bind a collection of objects to my chart. The binding must be dynamic, that is, when I add an object to the collection the chart should be updated accordingly. I have attached a code example. Issues related to the:1. is it possi

  • Where can I get en_office_web_apps_x64_517488.exe

    Where can I get en_office_web_apps_x64_517488.exe for Office Web Apps for SharePoint 2010 Enterprise