Flex :: Datagrid Not Updated Properly?

Jul 19, 2011

I have two tables: Person {pID, pName, deptID} and Departments {deptID,deptName}An SQL statement like this gets me the name of a person and the department name:

SELECT pName, departments.deptName FROM people INNER JOIN people.deptID = departments.deptID;

The above works fine. I have a Flex DropDownList that is populated with deptNames. When I click the submit button, I am able to obtain the ID of the selected department without problem:

protected function button_clickHandler(event:MouseEvent):void
{
person.pName=pNameTextInput.text;
person.deptID=pDepartmentDropDownList.selectedItem.deptID; //ID of selected department obtained correctly.
if (person.pID == 0)

[code]....

From the comment above, I see that adding person will indeed add the attributes of the person object to the datagrid, except that one attribute is a foreign ID (deptID) from departments.

View 2 Replies


Similar Posts:


Flex :: Datagrid Refresh When Dataprovider Is Updated?

Feb 22, 2010

i am working on an aplication using flex,adobe air...i have a datagrid with a XML as my dataprovider...during the execution of program my XML is updated....after XMl is updated and saved my datagrid should also get update..I have used Dataprovidername.refresh() method but it is not working.

View 4 Replies

Flex :: Refresh The Datagrid To Reflect The Updated Data?

Apr 5, 2012

I am trying to refresh the datagrid to reflect the updated data after the user updates the database. I have the following code:

script
protected function updataHandler(event:MouseEvent):void
{
updateJobsResult.token = Service.updateJobs(updateJobData);

[Code].....

View 2 Replies

Flex :: DataGrid Column Width Is Not Set Properly?

Jan 4, 2011

In the below example I has called the OptimizeDataGrid method on Button Click event to resize the Column according to the data. whereas on the First Time of the Button Click event It called the function whereas the Datagrdi Column width alone is not set properly.whereas on second time it is working properly.For Eg : In the below statement the text value is coming as 55 and widthPadding is comes as 25. but the sum of these two value is not in the dg.columns[col].width.

dg.columns[col].width = text + widthPadding;

But the same is working on the second time of the Button click event.

<mx:Script>
<![CDATA[
import mx.utils.ObjectUtil;[code].....

View 1 Replies

DataGrid Inserted Data Not Being Updated Fast Enough?

Jun 26, 2009

I have a multi-column DataGrid that I've populated only three of the seven columns with data. One of the columns are editable. The other three are not editable. What I intend to do is have the user enter data into the editable column. Once the data is entered, The other three empty non-editable columns will populate based on calculations done to the value in the editable column.The problem is that when I enter data into a row of the editable column, the data isn't being reflected as entered until I try to add a new row. Is there any way to get the value being entered into the cell right after it is entered without the user having to enter a new row?

View 1 Replies

ActionScript 2.0 :: Detect When The Data In A Datagrid Has Been Updated

Nov 28, 2004

I need my script to somehow detect when the data in a datagrid has been updated [not by the user, like on(Change) but like onData or something]

View 1 Replies

Flash Datagrid Change Cell Color Depending Upon Updated Data

Apr 27, 2011

I have a datagrid in my Flash app whose data keeps updating quite frequently.On every update, I need to change the cell color of only those cells whose data has changed.That too, if the updated value is less than the older value then the cell color should change to RED else, GREEN.I have tried using labelFunction, cellrenderer, etc. But to no avail.By no means, I am able to access the present data in the cells to compare it with the new data.

View 1 Replies

ActionScript 3.0 :: DataGrid Exported To PDF Not Working Properly

Mar 22, 2012

What I'm trying to do is export a datagrid to a PDF, which is working fine except that it keeps dropping out the data of the 4th column every time. I've set breakpoints to make sure the data is still there and it shows up but when the PDF is created that whole column has no data in it.

ActionScript Code:
private function printPDF(event:MouseEvent):void{
this.removeEventListener(MouseEvent.CLICK, printPDF)
var PDFcolumns:Array = getPDFColumns(_dataGrid);
var resultsArray:Array = _dataGrid.dataProvider.toArray();
var pdf:PDF = new PDF(Orientation.PORTRAIT,Unit.MM,Size.LETTER);
[Code] .....

View 0 Replies

Flex :: Gui - Panel Not Being Updated?

Dec 29, 2009

I am drawing a cellular automaton simulation on a Flex Canvas. I alternate computing the state of the automaton with updating the graphics on the Panel. However, the updating of the Panel does not seem to be "keeping up" with the update of the CA state.

I'm wondering whether I am doing something wrong with my handling of the graphics code. The code is below. Sorry it's so lengthy, but I don't think the problem will happen with anything simpler (well, it probably will, but I'm not certain I want to take the time to find it).

[Code]...

View 1 Replies

Flex :: How Content Dynamically Updated?

Jul 16, 2009

problem-1:In php we can easily move one page to another and easily use different type of function from those pages.In flex3 how i can use different type of .mxml pag

View 2 Replies

Flex :: Why Does TileList SelectedIndex Not Get Updated

Aug 14, 2009

In the code below, the presentedAlbumIndex is used to control the selectedIndex of the TileList. Item "five" is initially selected. Whenever the button is pressed the first item in the array is deleted, and the presentedAlbumIndex is decremented.

In theory, the selected index should stay with "five" every time the button is clicked (until "five" is itself deleted). It works this way for the first button press. However, on the 2nd button press the highlighting changes to "six" for some reason. Also, the TileList selectedIndex is always one behind.

I tried looking into ListBase and monitoring selectedIndex. It looks like the selectedIndex is updated initially to the correct index, but then it reverts back at some point to the correct index+1. I do not know why it's setting back.

It seems it's due to the fact that I am doing a data provider delete and index change in the same operation.

Is there some function in TileList I could override to keep selectedIndex up to date?

Steve

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

[Code]....

View 1 Replies

Flex :: Facebook Status Can Be Updated Through Air

Jan 25, 2010

Want to find out if facebook status can be updated through flex or air.

View 1 Replies

Flex :: Get Updated Array Length?

Mar 13, 2011

I am trying to get the length of an array through mxml (not actionscript). I have the following:

<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"

[Code].....

Why does test2 show the correct array length but test1 is stale?

View 2 Replies

Flex :: MovieClip Not Being Updated While Loading A File?

Nov 5, 2010

I have a MovieClip which is just a progress bar animation with about 100 frames. Then I load a zip file using a URLStreamLoader and subscribe to the ProgressEvent.PROGRESS event. After loading starts I receive notifications correctly and I set the bar's corresponding frame using gotoAndStop(). Everything seems to work fine except for the animation not being visually updated.

It seems that the scene won't refresh until the zip file is fully loaded.

View 1 Replies

Flex :: Cruisecontrol Dashboard Is Not Updated For The Project?

Apr 28, 2011

I setup Cruisecontrol to auto build a flex project every 1 hour using FlexAnt. The build itself works great - I can see when the project build fails/succeeds in the console perfectly well. But the cruisecontrol dashboard is not updated for the flex project.I have the sample connectfour project, and when it fails, I can see the red box for the project in the dashboard. This does not happen for my flex projects.

View 1 Replies

Flex :: Detect The Change In HSlider When Value Is Updated?

Jul 6, 2011

Is there a way to detect the value change in HSlider (in Flex 4.0) without touching the slider.Basically, what I wanted is to detect if the slider value was changed programmatically.

View 1 Replies

Flex :: Add Eventlistener If The Object Property Is Updated Or Changed In Air?

Nov 16, 2009

I am working in air application , i need to know how to add event listener when any object is updated,how can i implement this.Example:i have Class name Vehicle, and child class are Car,Bus,Bikes,Scooter,..etc, child class also have many properties like color,model no,....etc

I have array collection and AddChild() method in Vehicle class by this, i will add, child class to the vehicle class.I need a event listener which can trigger if any of the property is updated or changed in any of the child class property, how can i implements this in Flex3.

View 2 Replies

Flex :: Adobe Flash Builder DataGrid DataProvider CollectionEvent.COLLECTION_CHANGE Handler's Access To DataGrid??

Feb 14, 2010

I've added an eventListener to the COLLECTION_CHANGE event that is fired when the grid is finished resorting the items in its dataProvider, after the user clicks on a column header:MyType (myDataGrid.dataProvider).addEventListener(CollectionEvent.COLLECTION_CHANGE,onDataGridResort);

View 1 Replies

Flex :: Datagrid Selects The Wrong Custom Cell In Datagrid

Mar 15, 2010

I am working on a problem since a week soon, but I still couldn't make it work as expected. I have a DataGrid which has HBox with a CheckBox an a Label as itemRenderer (see Code below). When I tap in to the Cell the standard itemEditor pops up and lets you enter the content of the label. Thats the standard behavior. I works fine except for 2 problems:

If I enter to much text, the horizontal srollbar pops up, and the cell is filled with that scrollbar. As you see I tried to set the horizontalScrollPolicy to off, but that doesnt work at all... I tried to do that for all the different elements, but the failure is still existent. When I have filled more than one row, there is an other mistake happening. If I tap on a row, the datagrid selects the one below that row. That's only if one line is already selected. If I tap outside the datagrid and then, tap at any row the itemEditor of the right row will show up... Is there anything now wright in the setup of my set data method?

package components
{
import mx.containers.HBox;
import mx.controls.CheckBox;

[Code]......

View 2 Replies

Flash :: Turn Flex MXML DataGrid Into Something Like Horizontal DataGrid?

Mar 24, 2010

From this (normal dataGrid)

into this (horisontal data grid)

How to turn Flex MXML DataGrid into something like Horisontal DataGrid? (may be some how with Flash builder 4?)

Keeping all stuff DataGrid has like eating data from data provider sortind dragging - droping items etc

View 1 Replies

Flex :: Changing Dataprovider Of A Datagrid On Change Event Of Another Datagrid?

Oct 15, 2011

I have two datagrids:

- Division
- Members

Both have single columns. Selecting one item from Divsions datagrid should display members of that Division in the Members datagrid. But following code has some problem and Members of a particular division do not show up when respective Divsion is clicked.

Following are some snippets of the related code. Hope someone can spot an error in it.

[Code]..

View 2 Replies

Actionscript :: Flex - Know When The Source Property Of An Image Is Completely Updated

May 31, 2010

[Code]...

I am presuming this is because the image hasn't finished reading the png file off the disk yet. What event can I monitor to know when it's width and height will have the right values? The 'Complete' event only seems to work for DOWNLOADED images. The 'Render' event happens EVERY FRAME. The (undocumented?) 'sourceChanged', happens as soon as source changes, and has the same problem! What event do I watch that will let me know when the image's width and height properties will have valid values? Or is there some Synchronous version of I.source='xxx.png', that I don't know about?

P.S. Yes, I know I shouldn't use "C:" in an Air Program. This was just for illustrative purposes, so that you won't suggest I use "Complete", which never even seems to fire when the file indicated by source is local.

View 4 Replies

Flex 3.5 :: Flash HSlider Event Listener Not Triggered When Value Is Updated

Aug 16, 2010

I am writing a web application that will serve as a configuration for a random data generator that I have written in Java.The values that I set in this application will write to xml. The xml data is updated by a file called simulationParams.as and that file is added to each child in the "viewStack" so that when I change any of those values the simulationConfig file will be automatically updated.The problem is that when I press the randomizeBtn the proper events are fired and the listeners grab those events.My problem exists when I uncheck the randomize button.For some reason an event is triggered or the listener isnt listening so that when I uncheck randomizeBtn the values go back to their last position or value on the slider. Ex. if my initial value is 0 then press randomize the slider will go to 100. The config file updates and all is well.When I uncheck the randomizeBtn, the sliders value goes back 0 but the config file isnt update.The same thing happens when I press the useDefaultBtn for both selected/unselected, nothing gets updated.[code]

View 1 Replies

Flex :: Improve Datagrid Performance When Using Itemrenderer With In Datagrid?

Jul 31, 2009

For poor performance reasons, the DataGrid will cache checkboxes and reuse them for different rows. If you have 50 rows, it won't create 50 checkboxes. It will create as many checkboxes at are visible, plus a few more for padding, and then reuse them as you scroll. This is why you need to explicitly manage their state. How can improve it ? How can fixed checkbox value ? i used checkbox like below But checkbox doesnot remembering the values

[Code]...

View 3 Replies

Flex :: Flash - Programmatically Select An Item In A List After DataProvider Is Updated?

Jan 2, 2011

I have a Spark List container whose dataProvider is bound to a result set coming back from a RemoteObject call. Pretty standard stuff.

<s:List id="list" dataProvider="{model.stuff}" width="100%" height="100%"
selectedIndex="@{selectedSlider.value}"
itemRenderer="{stuffRenderer}">
</s:List>

The selectedIndex is associated with an HSlider, but that is not the problem. My issue is that I would like to automatically select a certain "preferred" element from the list (only initially...to guide the user).

I tried to do that in a creationComplete event but my data hadn't shown up yet...setting selectedIndex didn't work..

View 3 Replies

Flex :: Select Tree Node Right After The DataProvider Is Been Assigned / Updated / Replace?

Jan 26, 2011

i have a Flex tree control and im trying to select a tree node 3 levels down right after the dataProvider is assigned with a collection object like the following.basically treeItem1, treeItem2, treeItem3 are the nodes in the tree and treeitem3 is a child of treeItem2 which is a child of treeItem1. Assume these treeItem(1,2,3) are referenced correctly from the collection items.

my problem is that if i wait for the whole component to load completely then select the nodes, it open/select/scrolltoIndex correctly. However, if i were to select the node right after the dataProvider is assigned, then it doesn't even open or select (basically the this.treeService.selectedItem is always null).

this.treeService.dataProvider = oPricingHelper.getCurrentPricingSercicesTreeSource();
this.treeService.expandItem(treeItem1, true);
this.treeService.expandItem(treeItem2, true);
this.treeService.selectedItem = treeItem3;
this.treeService.scrollToIndex(this.treeService.selectedIndex);

View 2 Replies

Flex :: "Type DataGrid In CSS Selector 'DataGrid' Must Be Qualified With A Namespace" - Warning

Feb 4, 2010

I am attempting to style the headers in a flex datagrid and I keep getting the warning:

Type DataGrid in CSS selector 'DataGrid' must be qualified with a namespace

What does this mean? I have gone through a bunch of tutorials and none of them have worked. It seems like changing a the colors in a datagrid should be relatively simple.

Here is a code sample:

<mx:Style>
.headerCustomStyle
{
fontWeight: "bold";

[code]....

View 3 Replies

Flex :: Get Updated Image In Flex Image Control After Changing Source Not Name Of File (image)?

Jan 25, 2012

I am changing image through flex every time i change it saved into server directory with same name(which i am referring to show). So when i refresh my page my browser didn't send new request to server since it's already in request.so didn't getting new image.Tip:- when i clear browser history it will come with new image

View 2 Replies

Flex :: Assign DataGrid To Other DataGrid In Flex

May 13, 2011

in Flex I have something like that: [code]and dg is ALWAYS pointing at DataGrid (even if dg1 has name DataGrid_test and dg2 = DataGrid_test2) and finally action is made on my first DataGrid (DataGrid_test).[code]and search still points at ColorColumn :/ My problem is really easy- I just want to pass to search different dataGrid on each state.But still I don't understand why it doesn't work. My search function uses algorhitm Boyer-Moor for searching through dataGrid.dataProvider for some text. If it find something then it is pushed into new array and after passing whole dataProvider I colorize rows with searched word.

View 2 Replies

Flex :: Creating Ant Build Script To Build Only When A Dependency Was Updated?

Apr 14, 2011

I just started working with ant a few days ago. Right now I have a general buildall.xml which should call each project's build.xml. Because some projects depend on each other, I need to rebuild some other projects which depend on it. This isn't a problem--I'm just setting the depends property of the target. However, ant is always building the dependencies, even when the files haven't changed.Let's say project1 has no dependencies; project2 depends on project1; project3 depends on project1, 2; project4 depends on project1, 2, and 3; and so on.I could hack a solution which looks at project K, and checks if project 1 .. project K have updated files using uptodate. If so, then run the target. This is messy and appears unnecessary.

What is the cleanest way to implement this?EDIT: So I decided to just hack in a bunch of targets, "check_projectK" where it does the uptodate checks on all of its source files, its build file, and the build files of the 1 .. K-1 projects. Due to dependencies, this is always handled correctly. However, this is still a large amount of copy and paste for a large workspace.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved