How to add the same name of datagrid records, while I'm by selecting one of the check and click Add end to end

Hi friends,

I do flex mxml 4 web application with as3, I am struck upward in the next concept, shar your suggession thereon.

I use datagrid with 3 columns NUMBER, NAME, AMOUNT. an and a box Add button and a delete button.

I have two records in the same name in the grid, when I click on a record in the grid and click ADD means of button this year, both AMOUNT WILL ADD records that record with the same name and give this value in a text box.

How to do this?

useful suggesssion or sample modal

Thanks in advance,

B.Venkatesan.

Hello

var totalsum:int = 0;

var index: int = db.selectedindex;

var selname:string = bd.dataprovide.getItemAt (index) .name;

var totallen: int = (db.dataprovider) .length;

for (var i: int = 0; i<>

{

var checkduplicate:string is bd.dataprovide.getItemAt (i) .name;.

if(checkduplicate==selname)

{

totalSum += bd.dataprovide.getItemAt (i). AMOUNT;

}

}

textfield_id. Text = totalSum

---------------------------------------------------------------------- ----------------------------

Gallot Hiroji | [email protected] | www.isacglobal.com

---------------------------------------------------------------------- ----------------------------

Tags: Flex

Similar Questions

  • How to delete records of name of datagrid, while I'm by selecting one of the check and delete

    Hi friends,

    I work in flex 4 mxml with action script web application... i use a data grid and a delete button outside the grid.

    I have two records in the same name in the grid, when I click on a record in the grid and click on ways to remove this time, both records will delete this grid

    including the record with the same name...

    How to do this?

    any code suggesssion or helpful code snippets...

    Thanks in advance,

    B.Venkatesan.

    Hello

    First, get the length of the data grid.

    Assume that your datagrid id db and you want to delete the line that have the same name...

    first get the line selected and the name of the line selected.

    is the chosen name supoose

    var index: int = db.selectedindex;

    var selname:string = bd.dataprovide.getItemAt (index) .name; (name id column datafield).

    now, you research the name chosen for the same lines in the DataGrid.

    var totallen: int = (db.dataprovider) .length;

    for (var i: int = 0; i<>

    {

    var checkduplicate:string is bd.dataprovide.getItemAt (i) .name;.

    if(checkduplicate==selname)

    {

    db.dataProvider.removeItemAt (i);

    }

    }

    This will clear all the line who are with the same name with the name of the selected line.

    ---------------------------------------------------------------------- ----------------------------

    Gallot Hiroji | [email protected] | www.isacglobal.com

    ---------------------------------------------------------------------- ----------------------------

  • How can I get a name of table 1, column A, if column B is a negative number and insert the names of table 2?

    How can I get a name of table 1, column A, if column B is a negative number and insert the names of table 2?

    What is the formula?

    You can do this with a column of "index" in table 1, as this assistance:

    The formula in C2, filled to the bottom:

    IF (B =<>

    That increments a counter each time that it finds a negative number in column B.

    In the second table, you can retrieve a list of negative values in this way:

    The formula in A2, filled to the bottom:

    = INDEX (array 1::A, CORRESPONDENCE (LINE (−1, Table 1::C), 0))

    It takes the line number, the formula is activated, subtracts 1 to the header line and look up the result in the column of table 1 C.  If it finds a match, it feeds the line number to the INDEX page with retrieves the value of the column of table 1A.

    To hide the red triangles of signage wrap the IFERROR formula, like this:

    = SIERREUR (INDEX (table 1::A, CORRESPONDENCE (LINE (−1, Table 1::C), 0)),"")

    Of course, you can also simply filter on column B without the need to set up a column from another table or index.

    SG

  • How to calculate the second and minisecond for audio landmark

    I'm doing a sound synchronization for the clip audio and video in Flash. I found a tutorial on the web, and it seems to work. However, I do not know how to calculate the second and the mini (deuxieme from mp3 file. The first frame has the following lines to set the duration for each animation:
    Import class
    Import net.quip.sound.SoundSync;

    Stop the main timeline
    Stop();

    Create an instance of SoundSync
    var ss:SoundSync = new SoundSync();

    ss.addCuePoint ("IT", 20100);
    ss.addCuePoint ("admin", 20000);
    ss.addCuePoint ("maintenance", 19800);
    ss.addCuePoint ("treatment", 16479);
    ss.addCuePoint ("engineering", 14598);
    as.addCuePoint ("logo_epa_npdes", 12356);
    ss.addCuePoint ("construction", 8967);
    ss.addCuePoint ("370 mg/j", 7896);
    ss.addCuePoint ("mc_650, 000 ', 5439);
    ss.addCuePoint ("130 mg/j", 3254);
    ss.addCuePoint ("1938", 2439);
    ss.addCuePoint ("vintage_mc", 0);

    Use the instance of loading external MP3
    ss.loadSound ("Scn04 - 05.mp3", true);

    Create a listener object for the
    cuePoint and onSoundComplete events
    var listener: Object = new Object();
    listener.cuePoint = function (): Void {}
    Play();
    }
    listener.onSoundComplete = function (): Void {}
    Play();
    }
    ss.addEventListener ("cuePoint", listener);
    ss.addEventListener ("onSoundComplete", listener);

    and the soundsync.as file as follows:
    Import mx.events.EventDispatcher;
    Import mx.utils.Delegate;
    class net.quip.sound.SoundSync extends its {}
    PROPERTIES
    private var _cuePoints:Array;
    private var _currentCuePoint:Number;
    private var _interval:Number;
    private var _intervalDuration:Number;
    private var _secondOffset:Number;
    Event dispatcher
    public var dispatchEvent:Function;
    public var addEventListener:Function;
    private var removeEventListener:Function;
    CONSTRUCTOR
    public void SoundSync(target:MovieClip) {}
    Super (target);
    init();
    }
    METHODS
    private function init (): Void {}
    Initialize properties
    _cuePoints = new Array();
    _currentCuePoint = 0;
    _intervalDuration = 200;
    _secondOffset = 0;
    Initialize the instance of the class as the valid event broadcaster
    EventDispatcher.initialize (this);
    }
    Add Cue Point
    public void addCuePoint(cuePointName:String,_cuePointTime:Number):Void {}
    () _cuePoints.push
    {
    type: "cuePoint",.
    name: cuePointName,.
    time: cuePointTime,.
    target: this
    }
    );
    _cuePoints.sortOn ("time", Array.NUMERIC);
    }
    Get cue point
    public void getCuePoint(nameOrTime:Object):Object {}
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (typeof (nameOrTime) == 'string') {}
    If (_cuePoints [meter] .name == nameOrTime) {}
    return _cuePoints [counter];
    }
    } Else if (typeof (nameOrTime) == 'number') {}
    If (_cuePoints [meter] .time == nameOrTime) {}
    return _cuePoints [counter];
    }
    }
    counter ++;
    }
    Returns a null value.
    }
    Get the Index of the current Cue Point
    private void getCurrentCuePointIndex(cuePoint:Object):Number {}
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (_cuePoints [meter] .name == cuePoint.name) {}
    return the meter;
    }
    counter ++;
    }
    Returns a null value.
    }
    Get the next Cue Point index
    private void getNextCuePointIndex(seconds:Number):Number {}
    seconds (seconds) =? seconds: 0;
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (_cuePoints [meter] .time > = seconds * 1000) {}
    return the meter;
    }
    counter ++;
    }
    Returns a null value.
    }
    Benchmark deleted
    public void removeCuePoint(cuePoint:Object):Void {}
    _cuePoints.splice (getCurrentCuePointIndex (cuePoint), 1);
    }
    Remove all Cue Points
    public function removeAll_cuePoints (): Void {}
    _cuePoints = new Array();
    }
    Beginning
    public void start(secondOffset:Number,_loops:Number):Void {}
    Super.Start (secondOffset, loops);
    dispatchEvent ({type: "onStart", target: this});
    Reset benchmark
    _secondOffset = secondOffset;
    _currentCuePoint = getNextCuePointIndex (secondOffset);
    Poll for cue points
    clearInterval (_interval);
    _interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
    }
    Load sound
    public void loadSound(url:String,_isStreaming:Boolean):Void {}
    super.loadSound (url, isStreaming);
    clearInterval (_interval);
    _interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
    }
    Stop
    public void stop(linkageID:String):Void {}
    If {(linkageID)
    Super.Stop (linkageID);
    } else {}
    Super.Stop ();
    }
    dispatchEvent ({type: "onStop", target: this});
    Kill the ballot
    clearInterval (_interval);
    }
    Survey benchmarks
    private function pollCuePoints (): Void {}
    If the current position is close to the cue point.
    var time: Number = _cuePoints [_currentCuePoint] .time;
    var span: Number = (_cuePoints [_currentCuePoint + 1] .time)? _cuePoints [_currentCuePoint + 1] .time: time + _intervalDuration * 2;
    If (position > = time & & position < = span) {}
    Send event
    dispatchEvent (_cuePoints [_currentCuePoint]);
    Advance to the next landmark...
    If (_currentCuePoint < _cuePoints.length) {}
    _currentCuePoint ++;
    } else {}
    _currentCuePoint = getNextCuePointIndex (_secondOffset);
    }
    }
    }
    EVENT HANDLERS
    onSoundComplete
    public function onSoundComplete (): Void {}
    Kill the ballot
    clearInterval (_interval);
    Reset benchmark
    _currentCuePoint = 0;
    Send event
    dispatchEvent ({type: "onSoundComplete", target: this});
    }
    }

    any help will be greatly appreciated.

    Wuzhishan,

    > Hi Dave, your tutorial is very cute and it is very useful.

    Thank you! My daughter is cute. She inherited all of
    me, so I have not left. ;)

    > I'm sorry that I don't have my question clearly.

    No worries. :)

    > I have listen mp3 in Windows Media Player and try to
    > get both for the tail, I found it on the bottom of the
    > player time indicates 00:26.

    I'm with you.

    > How can I writer this number in the code? Is it 0026 or 26?

    The code expects milliseconds, then 26 seconds would be written as
    this:

    26000

    If he said 01:22 (one minute and 22 seconds), you must write it like this:

    82000

    ... which is 60 seconds for now, 22 seconds
    side, then multiplied by 1,000 to get milliseconds.

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • How to capture the paging and sorting of events to update the collection?

    I use a manual tabular form based on the collection. If I add/edit the data in the form and click next/previous page, all the changes are gone. The same thing happens when I sort the data by clicking on the column header.

    Apparently, I need to call APEX_COLLECTION. MERGE_MEMBERS the new or changed data in the collection. However, I could not imagine how to do it. One way would be to set up the javascript function called $a_report and precede wit a call to my js function that would proceed to an update of the collection. But how?

    Maybe there's a better way?

    Igor

    Igor,

    You will need to spend to use rendering partial Page to full page on this report. In the 4.0 version we should get more management control in the RRP, but to what extent is it still unknown events.

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen
    http://sourceforge.NET/projects/plrecur

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    I recently had to format my hard drive and reinstall iTunes 12.3.2.35 on my Win7 PC. As part of the re - install iTunes, I clicked on the button scan for music.  This has created duplicates several of my songs.  I deleted then the duplicate songs from iTunes, but when I went to play a few songs a pop-up said "the song would not be because the original could not be found.  You want to locate? "When I tried to locate the song it is not found, but when I pulled the songs out of the trash they could be found.

    How can I keep the original and remove any duplicate songs in iTunes on PC Win7 which took place after iTunes to scan for music during a re - install?

    iTunes can create duplicates if the same content is added several times from outside the media folder when it is about to make copies of everything that is added to the library, or is added from an external drive that hosts the press kit that was disconnected during the launch of iTunes.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > display > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • Hi I have just signed up for the Apple's music and I forgot to cancel my game from itunes (it is no longer needed) who crossed just automatically - how to cancel the game and can get a refund?

    Hi I have just signed up for the Apple's music and I forgot to cancel my game from itunes (it is no longer needed) who crossed just automatically - how to cancel the game and can get a refund?

    To stop renewing, login to your account (for example by tapping your id settings > iTunes & App Store on your iPad, or by clicking on your name / icon to the top right of the iTunes on iTunes on your computer screen), and go to the iTunes in the cloud Section - see to halfway down this page: subscribe to iTunes game - Apple Support

    In terms of refund, try to contact iTunes Support and see if this will change (purchases are considered final), either via http://reportaproblem.apple.com or http://www.apple.com/support/itunes/contact/

  • How to set the Date and time on a remote target in Measurement &amp; Automation Explorer (MAX)?

    Hello

    I'm trying to follow the steps described in the following link:

    How to set the Date and time on a remote target in Measurement & Automation Explorer (MAX)?

    It is said

    The software on the target currently supports only the time zoneand deletes the old files?

    I need set the date and time

    and remove all the old unwanted files

    the calendar was gray does not allow me to change the current date.

    Anyone know how to change

    Hi all!

    According to this the below Knowledge Base article, Remote Configuration System Support must be installed on the target for time settings to change in MAX.

    http://digital.NI.com/public.nsf/allkb/FAB0EC4D6E5EE0F386257738005733A3?OpenDocument&MeTC=max_MAXDat...

    If you don't know what version of the system supported remote Configuration software that you have installed on your device target, it is likely that it is not yet installed. Add this software by clicking below your target to the MAX software option and selecting "Add/Remove Software". This is where you will install the System Configuration Remote Support software.

    Please let us know if you have any questions!

  • How long does take to load lightroom? and how to pause the download and start later?

    How long does take to load lightroom? and how to pause the download and start later?

    Hi AdobeIDBailey,

    The time required to download the product depends on the speed of your internet connection.

    The download cannot be suspended once launched, it will stop when you are finished, or if you cancel it.

    If you see it is stuck or not moving not quite so if please cancel the download and refer to the steps below and try the download again: (these steps will also increase the speed of downloading as security software can also slow your downloads)

    1. turn OFF any security software or firewall installed on your machine temporarily

    2 - CUT the browser protection tools or add as well as for now.

    Let us know if that helps.

  • How to change the size and color of 'staticText '?

    Can anyone share please how to change the size and color of the object "staticText"?

    function buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Gear of Stress', undefined, {resizable: true});

    var txt is myPanel.add ("staticText", [0,0,100,20], "txt");.

    txt. newFont, fontSize, color?

    Return myPanel;

    }

    var myToolsPanel = buildUI (this);

    I did a quick test on a PC at the office and it seems that Gill without isn't a stock PC police. You could comment on these out or change them to a police stock as Helvetica or something. Once I removed that it has launched on PC very well.

  • How to install the plugin and outside the filter in photoshop cs? and all the Special filters for special effects?

    How to install the plugin and outside the filter in photoshop cs? and all the Special filters for special effects?

    Please recommend me a better and such me step by step how I'll add more plugins n filter

    One I normally come with an installer or installation instructions. See the documentation for the plug-in you are trying to install.  It sounds like you don't know what plug-ins you want to install.  In this case, you don't need to install a.  At some point, you can read about a plug-in and what she can do and you feel you need it.  Then you will have a reason to install a plug-in that is not installed by default.  There may be a cost involved more useful plugins are not free.

    Adobe Plug_ins optional downloads are Plugins Adobe want from Photoshop and is no longer installed by default. Also at some point is no longer will install in the course Photoshop Adobe will remove the functionality or use of interfaces. For example CS5 optional plugins install in perpetual CS6 Windows version 13.0.1.3 but not in version 13.1.2 subscription or perpetual Mac version 13.0.6 fot its 64-bit only and CS5 Mac Optional Picture package plug-in is a plug-in of only 32-bit.

    You will need to keep older versions of Photoshop if Adobe remove features you use in newer versions of Photoshop.

  • How to move the ball and chain together?

    I created a bunch of balloons 3D and applied the preset wiggle individually to each ball. The strings are also different with each of the others that I have related to the respective ball but cannot work out how to apply for balloon wiggle and channel "move together". At the point where the ball moves in a direction and strings in another even if they have the same settings.

    Could someone please advise how to do the ball and chain squirm together?

    Thanks in advance

    Tutorial a zillion years here on the kite. It might as well be a balloon. I don't know why the QT link is broken, but this is a update of project CS5.5 folder for you to watch.

    Here's the movie:

  • How to change the highlight color, click the button image and text and sound.  are there packages of buttons for use in my project?

    How to change the highlight color, click the button image and text and sound. are there packages of buttons for use in my project?

    Hello

    Even if the point of things based Web links buttons created using them is of simple images. Captivate uses simple images. If you need to put your creative hat and not to let the fact that you see the word 'web' scared you somehow. An image is an image. Use on the web, use Captivate. Same case!

    If you change the properties of the button, you can activate the legend of success. Fix any sound that you like with the legend of success and it will play when you click the button. If you do not want to see the legend of success, delete the text and configure it as transparent.

    See you soon... Rick

    Useful and practical links

  • I don't have a message to tell me the image my takes up screen is set to full screen. How to disable the who and the fade slow when he goes to fs?

    In Firefox 42

    When a site like youtube when I make the video fullscreen it just melted slow useless when it does. And then tells me that it is full screen. I know that it is full screen for two reasons. One, I hit the button fullscreen. Two, the video takes up my entire screen. The message point. Use the fade. How can I disable them?

    To disable the fade, you can change these preferences of the topic: config page.

    • full-screen - api .transition - duration.enter: "0 0".
    • full-screen - api .transition - duration.leave: "0 0".

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    I do not know how to disable the warning, but it might be possible to hide this message with code to userChrome.css or elegant.
    This message is displayed for security reasons because a malicious script can switch to full screen mode and take over the entire window without noticing you (i.e. show a fake office).

Maybe you are looking for

  • Does not connect with the e-mail server after update.

    Thunderbird ran an auto update yesterday. Then it just stopped working. It does not connect with the Comcast email server. An error message appears "Unable to connect" and "the connection was refused when attempting to contact live.mozilla.messaging.

  • Satellite P100 - 160 PSPAAE: Question on the driver installation instructions

    Hello. I recently bought a P100-160 model PSPAAE with Vista pre-installed. Like many others, I had no choice with the OS and my experience so far has left me wanting to go back to XP. I found the page of appropriate support for the drivers (I guess I

  • M225DW: m225dw readiris pro software

    I'm unable to locate the software download for the Readiris Pro software that comes with the printer MFP M225DW. I found a lnk buried in the documentation, but of course, I get a 404 error when trying to access it. Where can I download the software?

  • Alltel HAUWEI question internet connection

    I contacted Alltel, which is where I get my wireless internet service and spoke to the Advanced Technology Department.  And there is something missing in my Windows XP, what they say, so I can't launch the wireless internet.  He told me that it can n

  • HP Pavilion dv9700

    My laptop lost the cd/dvd drivers. I checked the bios and it showed no cd/dvd. Where can I get updated drivers since for download in the bios and windows? The DVD makes a noise when a disc is inserted, but all media players don't say no disc is loade