ItemRenderer and DataGrid problem

Hi guys.

I'm on the creation of a small application which simply pulls information from an XML file, it is displayed in a DataGrid control and allows the user to filter and search. First things first though; I'll explain what I have so far and detail my problem.

I retrieve the XML file by HTTPService and then put the results in a collection of ArrayCollection Bindable. When the source of the Datagrid control is set to this ArrayCollection collection, it works fine. What I'm trying to do in the first, use an itemRenderer in a column that displays lines of text based on the values of the current line.

For example, the structure of my XML file is (approximately):

< content >
< name > name1 < / name >
< description > Description goes here < / description >
Yes < audience1 > < / audience1 >
< audience2 > not < / audience2 >
Yes < audience3 > < / audience3 >
< / content >

So what I'm trying to do, it's the public each piece of 'content' is set to Yes for the group. Under the 'Public' column in the datagrid control, the above content would say

"Audience1.
Audience3 ".

as this was a Yes value between 1 and 3 public. I tried to write very basic code within the itemRenderer by which I have replaced the game of public data and do some checks here, but it never seems to work right. I tried to use arrays in this for store public courses, but I clearly do not have the right format for it.

There must be a better way to do this. I'm fairly new to Flex and AS3 (summer use AS2 for quite awhile now) but I have the feeling, there is a way to store the list public rows in a model of object/table/so I can refer to it later (I intend to filter these results by type of audience later so I think I'll have TO do it this way later). I read a lot of tutorials and guides, but honestly, I don't know where to look for more, none of them does not appear to cover this specific problem.

I hope this makes sense to you guys and eventually you could give me guidance would be greatly appreciated.

See you soon

If you want to just display a concatenated string representing the nodes where the public [n] has a value of 'Yes', you can do this by using a labelFunction(), which is much simpler to use a converter element

Tracy

Tags: Flex

Similar Questions

  • DataGrid problem using checkbox as itemrenderer

    Hello

    I created a flex application in that I used datagrid with 3 columns. The column names are col1, col2, col3. For each column of data are provided using itemrenderer. ItemRenderer is check box. If each column is filled with checkboxex. I want to make selected a checkbox control in col1 when I select the checkbox in col2 and col3. But I am unable to do so. If anyone has the solution for this, please provide me with.

    Concerning

    Kotaland.

    I wrote a peace of my Variant. The very idea is in solution of manolya

    The idea is that you don't need a reference to the box: you must change the data for itemRenderers.

    You need only to listen to the event click on the boxes (you can add an eventListener to your itemRenderer) and change the data property of the itemRenderer you need. Then change you properties (or attributes of XML data) data, it will be assigned to other itemRenderes for this line.

  • Update charts and datagrids based on selection

    I have trying to find documentation and examples explaining how I can choose something in a combobox control and do fill a series of datagrids and charts.

    GUIDELINES:

    Has. using a table XML of all municipalities in our region populate a combobox.  Then have the user select the municipality they are interested.

    B. take a picture of census which is in XML format and using HTTPServices read it in Flex and then based on what the user selected municipality fill a datagrid and a variety of graphs with data pertaining to the muni.

    I know that it is done because I see it all the time and took a class last week where it has been shown.  Unfortunately, it was the last day of the class and time was running out, so we received a brief overview of this.

    I would be very appriciate anyone who can tell me the samples and documentation either online or in books.  And I should mention that the terminology is always a problem.  I'm trying to do a custom event or what?

    The code below all the works.  What I want to say that I am filling successfully control combobox and datagrid with the appropriate data.  I'm not able to get the two communicate with each other.  In other words the datagrid is showing the whole table and ignoring the combobox.

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml"
    Layout = "vertical".
    creationComplete = "initApp ()" >

    < mx:Script >
    <! [CDATA]
    Mx.rpc.events import. *;
    Mx.controls import. *;
    Mx.charts import. *;
    Import mx.collections. *;

    [Bindable]
    private var acMuni:ArrayCollection = new ArrayCollection collection;
    [Bindable]
    private var acCity:ArrayCollection = new ArrayCollection collection;

    private function initApp (): void {}
    muniHS.send ();
    cityHS.send ();
    }

    private void eHandler(e:ResultEvent):void {}
    acMuni = e.result.GetAllMUNIS.MUNIS;
    }

    private void fHandler(e:FaultEvent):void {}
    var faultInfo:String = "error code:"+ e.fault.faultCode + "\n\n"; "
    "faultInfo +=" error string: "+ e.fault.faultString+"\n\n;
    mx.controls.Alert.show (faultInfo, "lack of information");

    var eventInfo:String = "event target:"+ e.target+"\n\n"; "
    ' type of event eventInfo += ":"+ e.type+"\n\n;
    mx.controls.Alert.show (eventInfo, "Event information");
    }

    private void eCityHandler(e:ResultEvent):void {}
    this.acCity = e.result.GetCITIES.CITIES;
    }
    []] >
    < / mx:Script >

    < mx:HTTPService id = "muniHS".
    URL = "" Data / GetAllMunis.Xml ""
    result = "eHandler (Event)" "
    Fault = "fHandler (Event)" "
    showBusyCursor = "true" / >

    < mx:HTTPService id = "cityHS".
    URL = "" Data / CityNames.Xml ""
    resultFormat ="object"
    result = "eCityHandler (Event)" "
    Fault = "fHandler (Event)" "
    showBusyCursor = "true" / >

    < mx:Panel width = "100%" height = "50%".
    paddingBottom = "10".
    paddingLeft = "10".
    paddingRight = "10".
    paddingTop = "10" title = "DataGrid" >

    < mx:ComboBox id = "muniCB".
    dataProvider = "{acCity}".
    message = "SΘlectionner town".
    labelField = 'city' / >

    < mx:DataGrid id = "dg".
    Width = '100% '.
    Height = "100%".
    dataProvider = "{acMuni}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "municipality" dataField = "City" / >
    < mx:DataGridColumn dataField = "year" / >
    < mx:DataGridColumn headerText = "month" dataField = "month_no" / >
    < mx:DataGridColumn headerText = "labor force" dataField = "laborforce" / >
    < mx:DataGridColumn dataField = "employee" / >
    < mx:DataGridColumn dataField = "unemployed" / >
    < mx:DataGridColumn headerText = "unemployment rate" dataField = "unemp_rate" / >
    < mx:DataGridColumn headerText = "tract" dataField = "geogkey" / >
    < mx:DataGridColumn headerText = "tract extended" dataField = "geogkeyx" / >
    < / mx:columns >
    < / mx:DataGrid >
    < / mx:Panel >
    < / mx:Application >

    Thanks for any help you can provide

    Richard Krell

    If the position meets your querstion or help, please mark it as such.

    First, use XMLListCollection to the data for the ConboBox and the xlcMuni result with Manager (instead of acMuni).

    Here is a simplified version of your app with the answer. It uses e4x for the filtering syntax.

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=13_Working_with_XML_03.html

    -CityNames.xml-



      Chicago
      New York City
      Boston

    -GetAllMunis.xml-



     
        Chicago
        1866
     

     
        New York City
        1872
     

     
        Boston
        1756
     

    -MainApp.mxml-


    http://www.Adobe.com/2006/mxml '.
    creationComplete = "muniHS.send ();cityHS.send();" » >
     
        Import mx.events.ListEvent;
    Mx.rpc.events import. *;
    Mx.controls import. *;
    Mx.charts import. *;
    Import mx.collections. *;
     
    [Bindable] private var xlcMuni:XMLListCollection = new XMLListCollection;
    [Bindable] private var xlcCity:XMLListCollection = new XMLListCollection;
    [Bindable] private var xlcDG:XMLListCollection = new XMLListCollection;
     
    private void eHandler(e:ResultEvent):void {}
    this.xlcMuni = new XMLListCollection (... with e.result);
    }
     
    private void eCityHandler(e:ResultEvent):void {}
    this.xlcCity = new XMLListCollection (e.result.city);
    }
         
    private void populateDG(evt:ListEvent):void {}
    var temp: XMLList = xlcMuni.copy ();
    xlcDG = new XMLListCollection (temp. () city is ComboBox (evt.currentTarget) .selectedItem));
    }
    ]]>
     

     
    useProxy = URL "" Data / GetAllMunis.xml ' = 'false' "
    result = "eHandler (Event)" / > "
     
    resultFormat = "e4x" result = "eCityHandler (event)" / > "
     

       
    prompt = labelField 'Select a common' = 'city '.
    change = "populateDG (Event)" / > "
       
    dataProvider = "{xlcDG}" >
         
           
           
         

       
     

  • GPS, Wifi and Bluetooth problems

    So I have an iPhone 6 running on IOS 9.3.4 and have had problems with the GPS and the strength of wifi connectivity and bluetooth for a while now.

    First of all, the GPS.  It does not work.  When I run the maps or google maps on my device and the input an address the app can give me a written plan, location, but will not show me on a map.  He'll start road to everywhere where I go and tell me to start position, for example, to the North on the road on that I am, but the arrow does not follow me and tell me when the turn or where I am.  Occasionally, he has a message of guidance down with a spinning wheel and then, after a few seconds, disappears.  I tried to reboot my device several times, I have reset the network setting, I reset all of the settings, I backed up my phone, reset it and recovered save him.  Nothing has worked.  I was at my local verizon store and received a 'new' (its definitely refurbished) phone and the problem persists on the new phone.  I reset the phone to factory setting without content, set up as a new phone and tried the cards again, thinking it might be a problem with the back to the top.  It still does not work.  I'm perplexed right now and do not know what to do/try.

    Second, wifi and bluetooth connectivity is terrible.  I can only receive a wireless signal so that in very close proximity with the router.  I tried to different houses/companies and it is the same question.  However, bluetooth is just as bad.  I use headphones wireless, and go to the gym/go for the route with them.  I used to be able to walk around the gym without my phone and have connected the headphones, but now I can't have my phone 2 feet of the appliance without the music being agitated (bad connection).  I'm really irritated that I cannot understand this point and that he can't seem to find a fixed solution online.

    If you have just updated to iOS 9.3.4, which I didn't even know still shone, so maybe it's a bug that comes with the update. However, your problems seem to follow a trend, you can not far from a source of connection and now a signal. It is perhaps because the necessary components for the Bluetooth, GPS and WiFi signal are damaged or defective. Have you dropped or spilled liquid on your iPhone recently?

  • My Firefox exit and gives a "not responding" message once I used Google Mail. I tried to boot into "safe" mode and the problem persists.

    I have a question where Firefox wont ' quit and give a message "not responding" after I've been using Google Mail. It works fine when I'm not using this program. I tried Safe Mode and the problem still happens when I go on Google Mail, so it is not connected with modules, extensions, etc.

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.

    Note: This will make you lose all the Extensions and preferences.

    • Sites Web open is not recorded in less than 25 versions of Firefox.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • Fields on several Internet sites have been changed in another language. The browser is set to English, and this problem does not occur with Chrome.

    Fields on several Internet sites have been changed in another language. The browser is set to English, and this problem does not occur with Chrome. Specifically, a large part of Tumblr and Facebook menu has been changed in another language (Russian, I think). I tried reinstall Firefox, clear the cache and reset firefox to its default state. None of them helped. Any suggestions on how to fix this?

    Hey again,

    Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    I hope this helps!

    Curtis

  • I bought my iPhone 5 s by T-Mobile and 2 months left to purchase. My phone don't get re will not charge. Support Apple says this isn't the phone and replace the cable. This was done and the problem remains. Anyone who has experience of this pro

    I bought my iPhone 5 s by T-Mobile and have 2 months left on the purchase. My phone no longer accepts a new presentation. Apple support ran a diagnostic and said it isn't the phone and that I should replace the cable. This was done and the problem remains. Everyone has to experience this problem? And, if so, what was the problem?

    He likely is the phone, but you do Apple physically inspect it. Send it or take it to the Genius Bar. You can do one or the other of http://getsupport.apple.com.

  • Satellite L650-1EQ - black screen and overheating problems

    Hello

    I have a problem with my laptop Satellite L650-1EQ.
    A few days ago my laptop was overheated quite often.
    I would like to start playing a video game and the computer could actually turn off after 10 minutes of playing it.

    I realized that this was getting serious so I stopped using my computer to play games and I decided that I need to clean it. However, I was looking for online on how to clean up my computer and then my screen turns white!

    I didn't know what happened and was very scared.
    I turned off the computer.

    The next day I turned on the computer to see if it was good, and the screen was black however the laptop power light comes on and I hear the vents work.

    I turned on the computer and tried to start it again, and the computer started fine.
    The image appeared and the problems disappeared.
    But I knew that something bad was about to come so I took the laptop computer repair technician.

    I told her what happened.
    He has used the vacuum to "clean" the dust of the computer and told me to go back if the computer kept a overheating.

    I restarted the computer again when I came home, and after an hour and a half the computer screen turns white but I don't think that it overheated. : s

    I tried to start the computer and the screen is black, no picture, the only light on is the power one and I hear the vents work. I tried of transformed market but now it just stays as if it were now.

    I tried on another computer for solutions such as the battery and pressing the power button for 2 minutes and other things, but nothing has worked. I don't know what to do so I decided to create a thread to get answers: s

    Please help me, thank you!

    PS: I'm sorry for my English, I know that's not the best

    Hello

    This does not sound very good boyfriend. I'm afraid that there could be some sort of dysfunction material Mr. something like the problems of graphics card or motherboard issue.

    You can try plugging the external monitor to the laptop just to see if something would be visible on 2nd screen.
    But if nothing will appear on the 2nd monitor, I think that the chip of the graphics card died :(

    Of course, this is just my personal opinion and a laptop computer technician must check the laptop to know what part of the laptop could be faulty.

  • AT300-100 - speakers and sound problem

    Hello.

    I bought a Tablet AT300-100 and have problems with the speakers and the sound. I noticed other people online with similar problems.

    Here are the problems:

    -The speakers stop working, and the Tablet needs to be restarted for that stakeholders to work again.
    -The noise increases abruptly volume for a few seconds, then returns to the normal volume.
    -It has no sound when I get a PIN on the lock screen, even if the is set to turn the sound on the lock screen.

    I wonder if this is a bug in the operating system rather than a problem with the hardware of the speaker.
    The operating system is up-to-date. Problems continue regardless of the sound settings.

    Any ideas?

    Thank you.

    > I wonder if this is a bug in the operating system rather than a speaker hardware problem

    By default, the system Android back and try it again
    Usually, if it would be a software related issue, the sound should work correctly after the reset to default settings.

    > If there is a bug in the operating system affecting the speakers, a reset may not work.

    Well, in this case, that you should get in touch with the service of Toshiba to get it checked

  • Satellite L750D - update BIOS 2.1 and its problem

    Hello

    I have little problem. I was downloaded from your website 2.1 BIOS for Toshiba Satellite L750D (PSK32E).

    I have been updating BIOS 2.1 and start the problem with the sound. When I start the game, music or else minutes 2 first sound plays correctly but then it stops without reason. No noise at all. I've been reinstalled op system but the problem is still there.

    Sound works for 2 minutes only then is completely off. Each application to start with sound plays 2 minutes and stop all silent is. I did a probe on my laptop the mother she s a computer portable twin. I have updated bios same problem 2 minutes and then no sound. My OS is win 8 64 pro my laptop mother is with win 7 x 64 premium.

    Two BIOS updated ver 2.1 on L750D and the problem is the same. Please fix the BIOS.

    The BIOS seems to be very old. I was released nearly 1.5 years ago, so to be honest, I doubt that his and BIOS problem.

    I had the similar problem with my other laptop equipped with a Realtek sound card.
    The sound appeared after connection and remove the headphone jack
    But I could solve this latest installation updated audio driver the Realtek driver page.

    But it seems that your Satellite does not support Realtek audio chip but the Conexant audio chip.
    Therefore, the solution could not be useful for you.

    However, I think that you need to update the audio driver. I recommend you google for driver Conexant SmartAudio HD and test the latest version of the driver available.
    On the internet, I find the Conexant SmartAudio HD driver version 8.65.9.51 for Win 7 / 8 Win / Win 8.1
    Not quite sure if this is the latest version, but you can test it.

    To manually update your driver:

    1. go into the Device Manager (right click on my computer, choose manage and then find Device Manager in the left panel)
    2. right click on the device you want to update and choose Update driver software
    3. choose Select the location of the new driver manually and navigate to the folder where you downloaded the driver

  • IOS 9 copy and paste problems

    There are many messages about the problems afflicting the feature copy / paste. There are also many recommendations on the web to work around or how to reset your device. What I want to know, Apple has never acknowledged there are problems and they are working to solve?

    No thanks posted by Apple and no problem with C/P on many devices for me or anyone I know.

    Please post a link to these positions of "many".

  • Hello. There is a problem on the IPhone s 5 - after reset, the display flashes on the sides for 10 minutes, then the flashing stops. And the problem does not appear again until they do not use a Hard Reset (Power Home). The phone is new (5 days). It's a m

    Hello. There is a problem on the IPhone s 5 - after reset, the display flashes on the sides for 10 minutes, then the flashing stops. And the problem does not appear again until they do not use a Hard Reset (Power + Home).

    The phone is new (5 days). It's a wedding?

    If you encounter this flicker, then the next troubleshooting step is to restore from a backup. If the behavior persists after the restore, then the last step is the factory restore. If after the factory restore and adding no additional content, you see always this problem, then you must make an appointment at the Genius Bar to the nearest Apple store or service provider authorized Apple to have the material examined. If the behavior goes after the factory restore, then sync again your content manually, without using the backup. It seems to me it's corrupted content in the backup.

    Restore your device from an iCloud or iTunes backup - Apple Support

    Use iTunes to restore your iPhone, iPad or iPod settings - Apple Support

  • iPhone 5 activate without sim card and the problem is average insert a SIM card when sim carn as invalid sim

    iPhone 5 activate without sim card and the problem is average insert a SIM card when sim carn as invalid sim

    Fast pleas tell me

  • With key and mouse problems

    First of all, I would like to turn off the box that appears when I place the mouse over an icon.  Several times he gets across what I'm trying to read and many times he says exactly the same thing as the icon.  How do I turn it off?

    Secondly, I have a laptop, and so have a touchscreen tablet.  My mouse seems to float itself or sometimes she does not respond to my touch or tap, and I touch or hit harder.  I watched my mouse properties and everything is correct and answer correctly.  There monte load static or is - it because my finger is too dry?  I am very frustrated and confused.  I hope there, can someone help me.  Thank you.

    Hi margin,

    What is the brand and model of your laptop?

    I suggest to follow the steps below and we update on the State of the question.

    We will clear the display file size information in folder under Folder Options ends and check if you get the file information when you place the cursor over the folder.

    a. start Microsoft Windows Explorer.

    b. on the Tools menu and click Folder Options.

    c. click on the view tab.

    d. Click to select or deselect the option information to display in the ends of file file size .

    On the question of the mouse, refer to the suggestions from this link.
    Mouse, touchpad and keyboard with Windows problems

    http://Windows.Microsoft.com/en-in/Windows/help/Mouse-touchpad-and-keyboard-problems-in-Windows

    After completing the methods suggested above, answer us with the State of the question.

  • HP/Compaq nc6400 laptop: HP/compaq nc6400 Windows 10 and graphic problem, erasing text in areas of immersive shell.

    I have a laptop nc 6400 product number: RB518UT #ABA uses an ATI mobility Radeon x 1300 graphics card, as well as Intel (r) mobile express chipset available 965 G. I chose to use Classic desktop windows at the moment and no problem at all now. I don't know about Vsync or 2D with any partbut I disabled it Aero, windows 'themes' clear the text, mosaic with not a spec left shaows WHEREAS I could think of and still the text clears using my own slider like gum or disappears and leavesablank. Alsooccasionaly gibberish are more black lines not only any official language, but today I thought that almost a nonsense post script type to some... in some mobile tiles that can refresh, but even that does not work as it always has... I am at a loss I need a decent graphics that I use photoshop and dreamweaver allt/times a day and at least they need to exploit as much as possible. I had no problem with their execution on this computer for the past 4 years or more. It has been now 4 OS on this big machine that has not had any problems over the past 7 years. He 4gig memory and 750 GB hard drive and lack of wellis touchscreen but... not worry Windows when they checked all this to check.  I am beyond my capabilities and need help. Even if I need to build my own divers I Although it will not be the fastest answer, but I can see the need to know how the alter pilots an asset right about now.  Please you all the

    suggestions will be an asset, as I am a "what to do now the level of frustration"and would like that much more about the reason for it. " I was just as lucky as my machine has never had issues that were close to that sort of thing.

    TY for any help, answers, all possible assistance, you may think.  I hope that I have provided a clear problem, and most of the information you need. I never used a service like other instances, that raising any issues that others have as well.  Always helping if I wasn't sure but never as difficult a question as is happening now.

    Ty for any possible assistance or suggestions that can point me in the right direction.

    egcorrell

    Hello:

    The only suggestion I can offer would be manually install the graphics driver Vista support for your laptop and driver, page and see if it works...

    BTW, the nc6400 has the mobile Intel 945 chipset, not the 965.  The 6910p has the 965 chipset.

    Download and run this driver... You will probably get an error of unsupported operating system.

    http://h20565.www2.HP.com/hpsc/SWD/public/detail?sp4ts.Oid=1847705&swItemId=ob_59975_1&swEnvOid=2103#tab1

    Conclusion of any windows error.

    Go to Device Manager and click on the video controller (or Microsoft based Display Adapter) who need drivers.

    Click the driver tab.

    Click on set to update driver.

    Select her browse my computer for driver software option and navigate to the folder of the driver that was created when you ran the file.

    This file will be located in C:\SWSetup\sp38833.

    Make sure that the include subfolders is selected and see if the pilot goes like this.

    Then restart.

    If your nc6400 has this problem with the SMSC Infrared driver with the! Marc, I went into the BIOS, found the menu of Ports and disabled the infrared port, saved and restarted.

    That got rid of the problem of device.

    I don't know of anyone who uses the infrared port anyway.

Maybe you are looking for

  • How can I stop my iPhone and the iPhone and my wife to keep each other recent call logs?

    On my iphone and on my wife's iPhone, you can find each other's recent call history. It's new.  Since the beginning of the iPhone, we have synchronised calendars and contacts, but never synchronized "recent call" logs. How can prevent us this? We are

  • Windows does not start Satellite S50

    I can't seem to fix my Windows 10 or reinstall it. I tried to do an image ISO Windows 10 in a USB flash key or enter the toshiba HDD erase mode. Can someone help me? Here are the details: satellite s50 I press 0 + power button to enter the recovery m

  • HP LaserJet 1018 drivers do not work

    I am trying to install a HP LaserJet 1018 on my desktop acer with Windows Vista. I tried the 32 and 64 bit, but no desire to work. Does anyone have any suggestions?

  • Services DHCP starts not leading ip address of 0.

    I have a DELL with XP SP3 computer.  Recently had a tour with several virus - them cleaned with Microsoft Security Essentials.  But now I can't on the internet because the IP address is 0.  I checked the DHCP services and it cannot start because the

  • Chicony usb 2.0 graphics rendered in case of failure.

    I have a PC laptop toshiba L300-148 with a built-in webcam running chicony usb 2.0 when I load the camera Assistant software it displays graphic render fail. I tried to re-setup and roll back the driver, I also deleted the devicde of Device Manager a