ActionScript 3.0 :: Check For Matching DataGrid Content?
Jan 23, 2009
I am building an app which is basically a timesheet. Once the user has chosen client, project and time spent they 'submit', and the three fields are added to a datagrid component. At the moment each time they submit a new row is added to the datagrid, I need to prevent a new row being added if that client & project already exists in the datagrid and instead just add the time spent to that column.
I guess I need a way to retrieve the content from the client and project fields and see if it matches what is being added, what is the method to get such information?
View 4 Replies
Similar Posts:
Jul 23, 2011
trying to make a yahtzee game but cant get it to score the 3 and 4 of a kind. I have dynamic text boxes that convert the dice to a number for scoring called result1, result2, ... How do I test to see if 3 of them match or 4 for the 4 of a kind and add the text boxes if 3 numbers match. I have a button that will start the function called score_3kind.
View 9 Replies
May 25, 2010
I have a DataGrid that contains data linked to a server. When I select mutliple items from the grid (using shift-select) and drag some items out from the DataGrid to another component, the array of items being dragged over appears to be in a completely arbitrary sort-order, and are not in the sort -order f the DataGrid as I'd expect.
Therefore, wwhen i drop them on the target (which is unsorted), their order doesnt match that of the DataGrid... what am I doing wrong and how can i fix this?
I'm getting the array using:
var dragItems:Array = event.dragSource.dataForFormat("items") as Array;
Is this the wrong data source on dragSource to look at?
I should mention that the drop target is a nonlist control, and that i am using a custom drop handler...
View 1 Replies
Feb 9, 2007
does anyone know how to check the value of a checkbox in a datagrid? i thought it was something like:[code]
View 2 Replies
Dec 5, 2011
Is there a way to check if flex datagrid column is empty or not? I tried to search for a DataGridColumn that would allow me to that but I couldn't find any.
View 1 Replies
Jan 24, 2012
I'm using the Spark DataGrid for the first time and finding it generally very usable.There's something I'd like to do with the contents of my grid now that I've drawn it though and I'm a bit stuck as how to proceed.I'd like to make a function that runs through each cell of a certain column in the DataGrid, that checks each value against an Array of predefined values; if it finds a match, it should then highlight the cell as conflicting, by changing its colour.I know you can access a particular cell's item renderer, by using the getItemRendererAt() function, and passing the column and row indices. But I can't see how I would, for example, loop through the values in each column
View 2 Replies
Jan 23, 2007
i jus want to know how do u check a specific cell for data say if its at row[1] and column[2].
View 2 Replies
Aug 23, 2009
I have a combobox and a datagrid that are both populated by an xml. The combobox works perfectly. The datagrid is loading something cause the auto scrollbar comes up and is longer or shorter depending on what category I select from the combobox. For some reason the datagrid simply isn't displaying any text. I'm sure it's something small that I'm overlooking, but I just can't find it.[URL]
View 9 Replies
Jan 5, 2007
I need to trace the content of my dataGrid (which I am using as a shopping basket), when the checkout btn is pressed.I want to be passing the data off somewhere else, but 1 stage at a time ay!?The basket has 6 columns.
View 3 Replies
Oct 14, 2009
how can I distinguish between image and swf? it works for image, but how can i ask if content is swf?
Code:
private function completeHandler(e:Event):void {
if(e.target.content is Bitmap){
_image = (Bitmap)(e.target.content);
View 2 Replies
Feb 17, 2010
I've got content coming into my application using a query and an ArrayCollection. I know how to display the content into a DataGrid by using the dataProvider propriety, but I'd like to use TextInput components and drop the DataGrid altogether.
I'm still having a problem all that displays is [object,object]
Here is a bit of my code.
[Bindable]
private var acCon:ArrayCollection;
private function reData():void //RETRIEVE DATA
[Code].....
View 1 Replies
Mar 19, 2010
I want to select information in a single cell from my DataGrid in Flex 3.
Specifically, I'm displaying three phone numbers per line and the user needs to be able to select one of those numbers, from any row, but not the whole row.
While similar to this, I am displaying the DataGrid to the user. The answer for that question was to manipulate the dataProvider, how can I know what cell I've selected in order to do that?
View 1 Replies
Sep 10, 2010
I have a datagrid:
<mx:DataGrid id="resultsDataGrid"
height="328" width="604" paddingRight="0" editable="false" y="43" horizontalCenter="0">
[Code]....
I only need the Title and Updated fields to actually be loaded into the DataGrid. This clearly doesn't work, (I think it's related to result.entry, that it must be something else like result.feed.entry, but I've tried a number of combinations and they haven't worked
View 1 Replies
May 5, 2010
- I have a sample online store with products & numeric steppers so the user can select the quantity the want. I want to display their selections into the flash datagrid so that upon checkout they can see the products chosen.
-I have several columns for the datagrid, "Quantity, Product, Price, & Total". I want to display the items chosen in their corresponding fields however, the way I have set up my code all of the items are appearing in the one column.
View 2 Replies
Nov 4, 2010
However that content is being served without extension,- "myMovieClip", "myPicture".
So I need to find a way for checking extension or file type of my loading content - *.swf, *.png, *.jpg ?[code]...
View 4 Replies
Nov 30, 2007
autoscroll functionality in Flex2's DataGrid while dragging an element row in it. Is there such a functionality or not?
I mean, I have a DataGrid which contains a collection of rows. The collection is longer that the DataGrid could fit, hence there is a vertical scrollbar that allows to get to the rest of rows. I have enabled the functionality of moving-by-draging to be able to change the order of rows in the DataGrid (see the simple code below).
Now, let's say I want to move the first (topmost) row to the last (bottom) position of the collection. When the top row is displayed, the bottom one is not visible (not without moving the scrollbar). So when I drag the top row, I cannot drop it beyond the few currently visible rows. Surely I could drag a bit and then scroll to bottom and then drag a bit more, but that's not the point. The point is - is there a functionality of autoscroll implemented in Flex2 DataGrid, where the collection would scroll itself automatically to allow one to drag beyond the few visible rows?
In Adobe's official PDF document "Flex2 Developer's Guide", section "Using drag-and-drop with list-based controls" I've found this sentence:
Quote:
If the control has active scroll bars, hovering the mouse pointer over the controls top or bottom scrolls the contents.
Well, it suggests that there should be this functionality I ask about. But it doesn't work for me.
Here's the simple code that builds the DataGrid in Flex2, that fails to autoscroll, if you care to check it:
[Code]...
View 1 Replies
May 5, 2008
I have a datagrid and would like to be able to save it's content to a text file and reload it.. I've used dataProvider and saved it to a text file but all I get in the text file is [object],[object].
View 2 Replies
May 16, 2011
I'm trying to create a layout not too different from the feed reader sample.The problem I'm having is that I'm finding the documentation unclear. There are so many different types of layouts that I don't know which one to use when.In the example, on the right side there are a few horizontal panels:
[feedToolbar(HboxPane)]
[feedItemsGrid(Datagrid)]
[filterToolbar(HBox)]
this does not include the details panel and the resize handle.I would like to swap the DataGrid with my custom content which is basically a sprite. The problem I have is that I cannot just include a sprite, because it does some funky resizing. I would like the scroll bar to appear when the content is too tall, and have have the same skin for the background as the DataGrid.
View 1 Replies
Mar 24, 2009
I have a list of GPS points I would like to plot onto a map. But how should I go about matching the points to the map?
I could imagine that I would need some control points so I can calculate the scale and rotation of the map, but I'm really not sure.
View 4 Replies
Nov 2, 2009
I am using e4x to get matching nodes from a given XML, It seems to work fine except one case.
[Code]...
View 2 Replies
Nov 30, 2009
I'm developing a flash application, and one of the things it has to do is take some user input, compare it to a number of possible matches in an XML file, and return the closest match. At the moment, I'm putting the user input into an array, looping through it, then looping through the XML and keeping track of how many nodes match in a separate array.That all sounds very confusing so here's an example:
The XML is structured like this:
[code]...
View 2 Replies
Oct 2, 2009
See [URL] Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified. Check exists in the libary (but does not have an instance name) and no where else on the stage. when I run this code I get: 1180: Call to a possibly undefined method Check. -> var rightCheck = new Check(); How is it undefinded if it exists in the libary?
View 7 Replies
Jan 27, 2011
The following is my codes. This is still work in progress; so, you will see some functions with empty contents. Plus, this is my first Flex application; please bear with me. This is a quiz application that gets the questions and answers to each questions from a ColdFusion web service. There are three types of questions, True or False, Multiple Choice with single selection, and Multiple Choice with multiple selections. So, based upon the question type, the application would dynamically generate the appropriate amount of radio buttons or check boxes for the users to select. I got these working. The problem that I am having is, I am not sure how to check what the users have actually selected. In some other forums and posts on other web site, it said that I can use event.currentTarget.selectedValue to get the user selection. But when I actually do it, I got a run-time error saying, "Property selectedValue not found on mx.controls.FormItem and there is no default value." My question is, what do I need to do to capture the user selections?
[Code]...
View 1 Replies
Aug 14, 2010
I have flex 4 and writing my own autocomplete component (based on the popupanchor) to search for different books. In the dropdown box, how can I highlight the text that matches? For instance, a user types in "ema" and the search returns "Pet Sematary"....I want to highlight the letters "ema" within "Pet Sematary"
View 1 Replies
Feb 5, 2011
I was given a task to make a match making game in actionscript 2, problem is, i have very little knowledge about the language (well, and how matching works in as2, what are the important codes, code emplacements, and all I am new in AS2, and i really need a lot of help with our project. :)
I plan to match images. But.. I was planning to have a sort of "Compatibility" match-up game, like,..let's say we have two batteries, one has a 50v capacity(how do u measure batteries?) then the other has a 100v capacity, then there's this battery slot that only accepts a 50v battery, then you will have to match this 50v battery to that battery slot, that's my concept for the game, sir. I hope you got what i said, sir. :D
View 1 Replies
Sep 28, 2011
i'm itterating thru an array of text field objects and tracing the selected focus field when pressing tab, as well as each object.i'm trying to equate these object, but while they trace the exact same they are not.
m_InputFieldsArray = new Array(m_TitleTextInput, m_CommentsTextArea, m_EmailTextInput);
for (var i:Number = 0; i < m_InputFieldsArray.length; i++)
{
trace("Get Focus: " + Selection.getFocus());
[code]....
the first group traces the same, but apparently they do not match. Selection.getFocus() returns a string, while the array index is tracing the text field object. if i add toString() to the text field object it will trace as [Object object] how can i accomplish a match?
View 2 Replies
Jun 20, 2011
I'm trying to create a simulator for the HyperTerminal console. On my swf file, the user is supposed to start by typing in "configure terminal" into TextInput. So far I'm able to do so using this code:
HTML Code:
this.stop();
stage.focus = input_4;
import flash.ui.Keyboard;
[Code]....
View 6 Replies
Feb 7, 2006
I am trying to create a game where random figures are revealed. These random figures relate to a list of monetary amounts on the same page. As a number is revealed the corrisponding amount on the page is then deleted, hopefully with a bit of fade, movement, jazzed up a little.I cannot work out a code in order to do it. The code below is how I randomise the hidden amounts via a button.
on (release) {
deck0 = "1p";
deck1 = "10p";
deck2 = "50p";
[code]....
The random amounts are hidden behind a button, when clicked reveals that amout.
View 1 Replies
Mar 22, 2009
I'm having a problem with using regexp to validate form fields, everything is working fine as long as I don't explicitly try to match a dot(.) character. This fails on both email and the voorletters regex. I've tested both these regexes in RegExr and they are doing what they're supposed to there.
Code:
var regex_voorletters:RegExp = /^([A-Z.])+$/i;
var regex_email:RegExp= /^([w-.]+)@((?:[w]+.)+)([a-zA-Z]{2,4})$/i
[code]....
View 11 Replies
Jun 2, 2009
I'm sure there are a million posts on this, but I cannot for the life of me figure out the wording under which they are classified.I am trying to get my site to scale so that the width is 100% the width of the screen, and the height, if there's more than can be viewed, is cut off. No scrolling. If I simply use the 100% width property, it seems to also give height at 100% value, so this way the whole site fits on the screen, but there is empty space on the right and left which is not what I want. Does this make sense how I've worded it?
View 5 Replies