Advice: Best way to do this?

I have a data grid with some basic user data in it and the last column contains a checkbox as item renderer.
Let's say there are 10 rows, and I deselect the checkbox for each row. At that point I need to disable a certain button.
What is the best practice method for this?
Also, the data sets that I will be populating the grid with, via PHP/XML can return thousands of rows. What is a safe number of rows for the data grid, so I can set some pagination method?
Thanks for any help.

Here's a little example, I used a button as ItemRenderer but you can use whatever you want.
You added a listener for the itemEditEnd event but that don't get fired if you click on an object in your itemRenderer.
Make sure your event bubbles, as the previous post mentioned:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            [Bindable]
            private var dp:ArrayCollection;
            private function init():void
                var arr:Array = ["one", "two", "three"];
                dp = new ArrayCollection();
                dp.source = arr;
                dg.addEventListener("myEvent", handleDGClick);
            private function handleDGClick(evt:Event):void
                output.text = "Clicked!";
        ]]>
    </mx:Script>
    <mx:DataGrid id="dg" x="10" y="10" dataProvider="{dp}" variableRowHeight="true">
        <mx:columns>
            <mx:DataGridColumn headerText="Column 1">
                <mx:itemRenderer>
                    <mx:Component>
                            <mx:Button label="Click me" click="dispatchEvent(new Event('myEvent', true))"/>
                    </mx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>
            <mx:DataGridColumn headerText="Column 2" dataField="data"/>
        </mx:columns>
    </mx:DataGrid>
    <mx:Label id="output"/>
</mx:Application>

Similar Messages

  • HT1451 I need to move my library from my old computer to my new laptop. What's the best way to do this?

    I need to move my library from my old computer to my new laptop (Windows 8). What's the best way to do this?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • Whats the best way to expose this in memory database? (ArrayList)

    Hello everyone.
    I was looking for advice on how I should implement this...currently I have the following ArrayList that stores ClassEntity objects. I'm going to write 2 classes that need to access this ClassEntity Object arrayList because they are goign to use these objects to spit out 2 different files.
    I didn't want to make the database public and static though.
    Here's a snippet of my current class that populates and creates the arrayList data structure:
    public class RODMFileParser
         //used to keep file information
         ClassEntity classEntity = null;
         //used to store ClassEntity objects
         List<ClassEntity> classEntityList = new ArrayList<ClassEntity>();
         //used to store the conversion table RODM->ENGLISH/ENGLISH->RODM
         ConversionTableParser convTableParser = new ConversionTableParser();
            else if(line.contains("Field Value "))
                        //now we can create a new Entity Class object! tricky! huh
                        classEntityList.add(new ClassEntity(idClassName,  idFieldName,
                                                                       englishClassName, englishFieldName, fieldType));
    Iterator listIter = classEntityList.iterator();
              while(listIter.hasNext())
                   ClassEntity tempObj = (ClassEntity) listIter.next();
                   System.out.println(tempObj);
              }So now classEntityList has all the objects I need to create these 2 seperate files but these 2 files are dramtically different. What would be the best way at exposing this classEntityList ArrayList so my 2 other classes can access it?
    Thanks!

    well if I made it non-static, wouldn't I have to create a new object of that class in each class I want to use it in?
    for example, that class that populates the database must parse a file to create the database.
    RODMFileParser file = new RODMFileParser();
              file.parseFile("QAGENT");So inside each class I would have to do this wouldn't I? if I made it public static, wouldn't I only have to read to the disk once?
    Putting it to a worst case say, 100 classes need this database, that means I would have to make 100 accesses to the disk woulnd't it?
    And if it was public static, it would jsut return a copy of the database that was only read from the disk once or am I misunderstanding how it works?

  • Is this possible and the best way to approach this?

    hello all, back again with more questions
    What I would like to do is load an external swf (preloader) into a container swf, when the preloader swf is loaded, run code from the preloader's document class that will check to see if the container swf is fully loaded.  Once the container swf is fully loaded, load in another swf and unload the preloader swf.
    I would like to keep all code in external classes and off timelines while creating a situation where I can load this preloader swf into any parent swf and do that check.  is this possible and the best way to approach this?
    any advice/help would be great.

    Why not just do it the more straightforward/normal way and use the preloader to load your other files? The preloader would load the 'container' you have now, and when it's done load the other swf you mentioned.

  • My old computer is dying and I want to transfer my account to my new computer.  I will not be using the old computer at all.  What is the best way do do this?

    I want to stop using my old computer completely and transfer my itunes account to my new computer.  What is the best way to do this?

    A simple search

  • My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    Have a look here...
    what-to-do-when-your-hard-drive-is-full.html

  • TS1314 I have lots of organized photos on my PC and I want to keep them organized to sync to ipad.... how is the best way to do this?

    I have spent a lot of time saving, organizing and arranging photos (for the last 7 years) on my PC, and would like to know the best way to transfer these, AND MAINTAIN THE ORGANIZATION OF THE FOLDERS, to my new ipad (and later, my iphone). I have a really good system, and I do not want to have to do it all over again, on the ipad. I DO NOT want to subscribe to another monthly service fee (i.e. the iCloud) but DO have iTunes on my PC.
    What is the simplest method to do this ?  I have tried synching, but, each time have lost photos (on my ipad) OR have had NO ORGANIZATION AT ALL to the photos once synced.  I have all these photos (5.6gb) in the My Pictures folder, then subdivided into years, then subdivided into events and months within the years.  So, my transfer of the My Picures folder, completely transfers all of them, but with NO further organization.  Again, I have spent years doing this, and don't want to have to re-invent the wheel. 
    Can someone advise (or even better, lead me to a youtube video) that accurately shows the best way to do this ?
    Thank you, in advance, for your help.
    p.s.  I particularly enjoy Dan Nations very informative articles on how to get the best from my products.  And, wish Apple would explain "how it works" regarding the syncing methods on the Operating System.  It is the only thing I "don't get" about using my iPad..... meanwhile I LOVE my new mini ! ! ! ! ! ! ! thanks Apple, for keeping things simple.... Please don't change that !

    Correct, it will only be one-level, the Photos app doesn't support sub-albums - the sub-folders photos will be included in the parent's album.
    If you select My Pictures at the top of the Photos tab when syncing, then you should get an album for each folder that is directly under it - so if I understand correctly what you described then that would mean an album for 2013, one for 2012 etc. And each of those should include all the photos in the subfolders under it - so 2013 would include the photos from the events and months subfolders under it.
    You can't sync them separately, only the contents of the last sync remains on the iPad, by not including a folder in the next photo sync you are effectively telling iTunes that you no longer want that folder/album on the iPad so it will be removed and be replaced by the contents of the new sync (you can't delete synced photos directly on the iPad, instead they are deleted by not including them in the next sync).
    The app that I use, Photo Manager Pro, allows you to select and copy a folder (via FTP), but you would need to select each subfolder individually, which if you have a lot would be time-consuming (I think that if you select '2013' it would ignore the folders beneath it).

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

  • I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard. What is the best way to do this.

    I have just purchased an iphone 4 and it needs me to have the latest itunes on my computer.  I have not upgraded by computer for some time and thought this is probably the time to do it. My computer is an imac intel with Tiger 10.4.11. I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard or higher.  What is the best way to do this?  Appreciate any help as I am out of practice. I used to be an old hand at this, but things have moved on since I didn't upgrade or use my computer as much!

    Catherina wrote:
    ...  What is the best way to do this?
    The best way, really the only way, is to purchase Snow Leopard.
    Online (UK): http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    Elsewhere: call the phone number in the Apple Online Store.
    Apple's price is $19.99, £14.00, €18.
    Snow Leopard is not available to download from any legitimate source.
    Once you install Snow Leopard, upgrade iTunes to version 10.7 or the latest, iTunes 11.
    iTunes 10.6.3 is the last version of iTunes to support Mac computers with Mac OS X 10.5.8 with either Intel or PowerPC processors, but since you have an Intel iMac, the best solution is to purchase Snow Leopard. Leopard is no longer available from Apple and prices from aftermarket vendors can be unreasonably high.

  • Urchased a new desktop pc and I want to move itunes and all files including IPAD apps to my new computer and delete off my old one.  What is the best way to do this?

    I just purchased a new desktop PC and want to move Itunes and all my Ipad Apps to new computer, and delete off my old computer.  What is the best way to do this?

    Hi,
    See Here for Transferring your iTunes Library
    http://support.apple.com/kb/HT4527
    Make sure Everything is working to your satisfaction Before Deleting anything from your old computer...
    Cheers,

  • I want to connect a Mac mini to a Samsung 40", Whats the best way to do this?

    I want to connect a Mac mini to a Samsung 40" LED tv to use as the monitor, whats the best way of doing this?

    Understand that there is one HDMI port on your TV that is specifically designated for PC connectivity. The order that the TV or Mini are powered on may determine your results. For your specific TV model, check buyer reviews on Amazon or elsewhere that can include optimum TV/Computer settings adjustment for improved viewing results.

  • I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this?

    I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this? I have found GearGrip's LCD harness so that I can do carry-on onto the plane...  Or maybe use a Pelican Case to do it as a "checked bag"? Or any other suggestions??! Please help!
    Thanks so much!!

    I don't recommend you send the iMac in a checked bag. Might get damaged.
    Check the airlines website for carry on guidelines.
    Or, if you have the original box that the iMac came in, if you have someone who can pick up the iMac for you, send it ahead Fed Ex and insure the package.
    Just make sure the display is covered to protect it. A blanket perhaps.
    Aloha ...

  • What's the best way for reading this binary file?

    I've written a program that acquires data from a DAQmx card and writes it on a binary file (attached file and picture). The data that I'm acquiring comes from 8 channels, at 2.5MS/s for, at least, 5 seconds. What's the best way of reading this binary file, knowing that:
    -I'll need it also on graphics (only after acquiring)
    -I also need to see these values and use them later in Matlab.
    I've tried the "Array to Spreadsheet String", but LabView goes out of memory (even if I don't use all of the 8 channels, but only 1).
    LabView 8.6
    Solved!
    Go to Solution.
    Attachments:
    AcquireWrite02.vi ‏15 KB
    myvi.jpg ‏55 KB

    But my real problem, at least now, is how can I divide the information to get not only one graphic but eight?
    I can read the file, but I get this (with only two channels):
    So what I tried was, using a for loop, saving 250 elements in different arrays and then writing it to the .txt file. But it doesn't come right... I used 250 because that's what I got from the graphic: at each 250 points it plots the other channel.
    Am I missing something here? How should I treat the information coming from the binary file, if not the way I'm doing?
    (attached are the .vi files I'm using to save in the .txt format)
    (EDITED. I just saw that I was dividing my graph's data in 4 just before plotting it... so It isn't 250 but 1000 elements for each channel... Still, the problem has not been solved)
    Message Edited by Danigno on 11-17-2008 08:47 AM
    Attachments:
    mygraph.jpg ‏280 KB
    Read Binary File and Save as txt - 2 channels - with SetFilePosition.vi ‏14 KB
    Read Binary File and Save as txt - with SetFilePosition_b_save2files_with_array.vi ‏14 KB

  • Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Once the user has entered the URL they want to add to the form. You can use the loadXML function to implement some special text in a label...
    var linkValue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><exData contentType=\"text/html\" xmlns=\"http://www.xfa.org/schema/xfa-template/2.8/\"><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acroform:2.7.0.0\" xfa:spec=\"2.1\"><p style=\"font-weight:bold;text-decoration:none;letter-spacing:0in\">The new link the user have entered is:<a href=\"" + textfield.rawValue + "\">textfield.rawValue</a></p></body></exData>";
      this.resolveNode("lblURL").value.exData.loadXML(linkValue, 1, 1);

  • I've been using older printers (including an imagesetter) connected to10.5.8  With a new 10.6 machine I'm looking to still use the printers. I can use the olderG5 as a sever if need be. What would be the best way to do this?   ine

    I've replaced my 10.5.8 with another machine 10.6.8 which as we know doesn't support Apple Talk which has been used to print to 2 bulletproof older printers and an imagesetter. I wan't to keep using the printers and can use the 10.5.8 as a server. What is the best way to do this?

    Hi
    You could do this a number of ways. Using the LPD Daemon might work best for your location?
    First: assign the machine you're going to use as the 10.5.8 'server' a fixed IP address.
    Second: add desired printers to that machine using the usual methods.
    Once added share them using the Print Sharing option in the Sharing Preferences Pane. On the 10.6.8 machine add the printer using the IP address of the 10.5.8 'server'.
    System Preferences > Print & Fax and click the '+' icon. Click on the IP Icon and key in the IP address you previously assigned. Leave the Queue field alone and select the relevant PPD from the Print Using field (see below). You'll have to search for these yourself.
    You don't have to 'install' the PPDs on the 10.6.8 machine as such. Simply copying them over from their location on the 10.5.8 machine (use a memory stick to do the transfer) to the same location on the 10.6.8 machine will be enough.
    There should be no need to restart.
    HTH?
    Tony

Maybe you are looking for