Flex :: DataGrid Edits Label Instead Of Data

Jan 20, 2010

I have an editable DataGrid in Flex, with data full of numbers. The columns have no special itemRenderer, but a labelFunction, which returns the number as-is if positive, but puts it in parentheses if it is negative, like so

27.3 => "27.3"
-27.3 => "(27.3)"

Now, these cells are editable. When I try to edit a cell with a positive number, nothing is wrong. But if I try to edit a negative number, it starts editing (27.3) instead of editing -27.3. Because of this, when the edit is done, the labelFunction is evaluated with the new value in parentheses(i.e.,labelFunction is called with "(30.5)"), and converting it to a Number results in NaN. So, I want to know if I can make the DataGrid edit the data in the dataProvider instead of the label that it shows.

View 1 Replies


Similar Posts:


Flex :: Get Data From Datagrid In A View To A Label?

Oct 26, 2011

<mx:DataGrid id="dgAutoFill" x="11" y="234" width="934" dataProvider="{rssHln.lastResult.rss.channel.item}">
<mx:columns>

[Code]....

I'm trying to get the title from the selecteditem from this datagrid (which is filled by a rss-feed) in a label. I've searched for ways, but I can't find how I should get this done.

This is the eventhandler I've added to the datagrid, and the function:

dgAutoFill.addEventListener(ListEvent.ITEM_CLICK, showDetails);
public function showDetails(event:ListEvent):void {
lblTitle.text = ?;
}

View 1 Replies

Flex :: Get Linkbutton Label Name And Selected Row Of Datagrid?

May 12, 2011

i am using below code for using linkbutton in flex datagrid

<mx:DataGridColumn headerText="Case ID" width="80">
<mx:itemRenderer>
<fx:Component>

[Code]...

now on link button click i want linkbutton label name and selected row inside lnkCaseIdClick method, how can i do this?

View 2 Replies

Flex :: Default Sort In Datagrid With ItemRender Label?

Aug 14, 2010

We know already Datagrid defult sorting , when we click on header of dategrid then automatically sorting records well . But how can we sort within inline itemreander linkfield label in datagrid . In project defult sorting properly work in datagrid but linked field column only not sorting ? Is it any way to sort functionality?

View 1 Replies

Flex :: Flash - Sorting A Datagrid Column By The Row's Label

Aug 18, 2010

I'm creating a table that displays information from a MySQL database, I'm using foreignkeys all over the place to cross-reference data.

Basically I have a datagrid with a column named 'system.' The system is an int that represents the id of an object in another table. I've used lableFunction to cross-reference the two and rename the column. But now sorting doesn't work, I understand that you have to create a custom sorting function. I have tried cross-referencing the two tables again, but that takes ~30sec to sort 1200 rows. Now I'm just clueless as to what I should try next.

Is there any way to access the columns field label inside the sort function?

public function order(a:Object,b:Object):int
{
var v1:String = a.sys;

[Code]....

View 2 Replies

Flex :: Using TruncateToFit For A Label Inside A Column Of DataGrid?

Feb 5, 2011

I am having this problem using the dataGrid in flex. I have a Label in one of the columns of the datagrid, and the label has the truncateToFit property True. But it is not working.

At first I had a static width to Label, and it works in that case. But the problem using that is, when I change the wide of the column, in the output, it does not changes the width of label, and if I make the column width small, the label wont get truncated.

Using 100% width for the label, does not helps either.

My datagrid code looks like below given code:

<mx:AdvancedDataGrid id="user_files_list" width="100%" height="100%"
top="0" left="0" dragEnabled="true" dragMoveEnabled="true"
dataProvider="{fm_model.user_files_list}"

[Code].....

View 3 Replies

Flex :: Embedded Fonts Not Being Applied Correctly In Label And DataGrid?

Mar 22, 2010

I am observing a problem with how an embedded font is applied to certain Flex components, namely mx:Label and mx:DataGrid. I have a CSS that declares three variations on an embedded font as follows:

@font-face
{
src:url("buttons.swf");

[Code].....

(I've snipped some stuff from both style rules, so if you think there's something that may be causing a conflict I can certainly post the entire definition. It's mostly color, line and padding stuff for the DataGrid.)

The problem that is for both Label and cells in the DataGrid the text is being rendered as sort of a times new roman font. The headers in the DataGrid are fine, just the text in the cells is wonky. All other components use the correct font as defined in the CSS/SWF.

View 1 Replies

Flex :: Value In Datagrid Itemrenderers Set Data Method Doesn't Return The Correct Data?

Jan 10, 2012

I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......

without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;

<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........

_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.

View 1 Replies

Flex :: Data Passed From DataGridColumn.itemToLabel To DataGrid.itemRenderer.set(data)?

Dec 4, 2009

I have a DataGrid whose dataProvider is an Array of int Arrays (each with different lengths). Since each row has variable size (and I want to display all the data), I decided to extend DataGridColumn and overwrite the itemToLabel function to be able to display the data. The problem is that I also need to display the data differently depending on the int value.

I believe the only solution is to write an itemRenderer, but the only input the itemRenderer.set(data) function receives is the entire int Array. I believe I need either the exact string returned by itemToLabel or the column index of the cell the itemRenderer is for (to basically do the same parsing I implemented in itemToLabel).

View 1 Replies

Flex :: Label - External Data In TileList?

Mar 12, 2010

I'm working for the first time with a TileList and an itemRenderer and I'm having a bit of trouble getting the information from my array collection to display Here's what I've got

private function loadData():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConn;[code].....

how I go about pulling the information from the array and putting it into labels like username, userjob, userbio ect, Inside the TitleList and itemRenderer.

View 1 Replies

Flash :: ArrayCollection Of Data For Label Test In Flex?

Jan 26, 2011

My label text is not showing up after binding the arraycollection to the label text. Could I see an example of how to properly bind an arraycollection to a labels text?

View 2 Replies

Flex :: Show Data Label When The Values Are Negative?

May 28, 2011

I have a bar chart where I'm trying to get the data labels to show. When the values are all positive the data labels appear fine. When I mix in some negative values, the datalabels don't show:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

Data Binding - Flex Additional Label In ButtonBarButton?

Dec 5, 2011

I'm trying to extend ButtonBarButton to include an additional label that shows the number of updates for the respective box in a viewstack (which is the tabbar's dataProvider).

I can get the additional label (named indicatorLabel) to read an initial value from data, but I can't get it to update automatically like the actual "label" attribute. My understanding was that you could bind to the data object, but that doesn't appear to be the case.

[Code]...

View 1 Replies

Actionscript 3 :: Custom Data Label For Flex 4 Pie Chart?

Feb 28, 2012

is it possible to create an item renderer for the data labels of a Flex Pie Chart?i know it is possible to change the formatting of the String using the label function. But i need more control of the way the data label appears.The background of the label needs to be a a specific color based on the data.

View 1 Replies

Flex :: Horizontal Label On DateTimeAxis Dissappears Sometimes After Changing Data

Jul 31, 2009

I'm working with an Adobe Flex project and I have data I'm plotting against a DateTimeAxis (X-axis) but because there are a lot of points, I have to do some manipulation and remove some objects in the array (I do this by copying data to another array, removing items, then copying the new array into the original array). However, sometimes after I do this, the date labels disappear off of the x-axis! Why does this happen? I look through my array and I cannot find a reason its occurring (no objects with nothing in them, everything appears in chronological order).

View 1 Replies

Flex :: Datagrid - Display A Multi-line Column Header Using The Flex Spark Data Grid?

Apr 13, 2011

How can you display a multi-line column header using the Flex Spark Data Grid for Flex 4.5?

View 5 Replies

Flex :: Datagrid - Flex ByteArray Data Field

Mar 25, 2010

The data provider (ArrayCollection) for my data grid consists of objects with ByteArray (int) fields. How do I make the data field display as int without transforming my data provider?

View 1 Replies

Flex :: DataGrid Not Displaying Data

Mar 31, 2010

I have a custom dataGrid that acts more like a 2D list (if that makes sense at all). I am dynamically creating the columns and recreating the dataProvider to suit my needs. While debugging I can see that I am creating the columns and setting them to the dataGrid and creating and setting the dataProvider, but for some reason I am able to see the dataGrid and the columns but not the data.

[Bindable]
private var mockData:ArrayCollection = new ArrayCollection([
{value: "425341*"},
{value: "425341*"},

[Code]....

View 2 Replies

Flex :: How To Link Data To A Datagrid

Jun 9, 2010

I'm following flex tutorials but i'm not doing exactly as they do, so :hat i want I have an input text, with a button 'search'.I want when this button is clicked that the data returned by the function search are displayed in the datagridWhat i have :

The text input :
<s:TextInput includeIn="DetailServeurs" x="58" y="361" width="209" id="txt_search" text="Default text" focusIn="txt_search_focusInHandler(event)"/>

[code]........

View 1 Replies

Flex - Refresh Datagrid With Hierarchical Data?

Dec 3, 2009

how can I refresh the displayed data in a Datagrid when the underlying ArrayCollection changes?

<nmoschitz:dataProvider>
<mx:HierarchicalData source="{arrCol_groupedData}"
childrenField="accounts"/>
</nmoschitz:dataProvider>

Calling a simple refresh (like with a simple arraycollection as a dataprovider, or with a refresh on the Grouping Collection) does not work. Also re-assigning the arrayCollection to the Hierarchical Data and then assigning this one again to the Datagrid does not work (even with calling invalidateProperties() or validateNow()).

View 2 Replies

Flex :: Maintain Selection In A DataGrid When The Data Changes?

Apr 6, 2010

I have a DataGrid and I set the DataProvider to my data. When my data changes the DataGrid loses the selected row and the scroll bar jumps back to the top. How do I maintain the selection and scroll position?

View 2 Replies

Flex :: Update Automatically Data From Datagrid?

Jun 11, 2010

I have datagrid binded with data acquired from web service which, as you may suspectretrieves data from some db. Datagrid has some editable columns and I want to update db through appropriate web service call without adding button "Update" as a last column in datagrid.

View 1 Replies

Flex DataGrid Shows Mixed Data?

Dec 14, 2011

i've working in flex for some years and it seems to me it's an awesome tool. Some days ago i've had an extrange behavior in my datagrid.

I have a php service which reads a database and sends this data to felx. The service and the info saved in the dataprovider in flex are working without problems, but when datagrid shows the loaded info, it shows many cells with wrong data. The data shown seem to be mixed with other cells. I have two registers: "The lightbulb is red" and "The dog is dangerous". But the datagrid shows e.g. "The lightbulb is Dangerous" or "The dog is red". When i see the dataprovider in a breakpoint all data is correct.

But it's even much strange when I click over a problematic cell, this automaticaly changes its content to correct values.

[Code]...

View 1 Replies

Flex :: Datagrid Freezes While Retrieving Data?

May 26, 2009

i have a datagrid which grows in size depending on the result of a call to my db. The call to the database returns an object with 30+ values for each row. When the number of rows returned exceeds about 80-90 the datagrid renders odd. It displays the first 50-60 rows fine but then it displays blank rows and they even continue to display outside the border of the datagrid.what is happening? Im using mxml webservice to retrieve the data.

<mx:DataGrid dataProvider="{resultsData}" rowCount="{resultsData.length}" allowDragSelection="false"
id = "confRoomLookupResults" width="948"

[code].....

View 3 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

Actionscript 3 :: Prevent Data Binding In Flex Datagrid?

Apr 12, 2012

I have two Datagrid in flex. I am binding data from Datagrid1 to Datagrid2 like

(Datagrid2.dataProvider=Datagrid1.dataProvider as ArrayCollection;)

If I delete Datagrid2 data then automatically another Datagrid1 deleted .

So I don't want delete data in Datagrid1 . how can i do that , But I have other option for delete data to Datagrid1?

View 2 Replies

Flex :: Data Bind DataGrid Component Without Scrolling Up?

Nov 28, 2009

I have a DataGrid component that I would like to update every 5 seconds. As rows are being added to this DataGrid I noticed that every update causes it to reset the scroll bar position to the top. How can I manage to keep the scroll bar at its previous position?

View 4 Replies

Flex :: Data - Displaying Properties From Two Objects In A Datagrid

Dec 11, 2009

Previously I post a discussion on this matter on Flex Adobe forum and still don't understand what needs to be done. So, I'll try my luck again on stackoverflow. I'm using drag and drop data binding functionality in flash builder 4 on a data-grid. However, the data I need to show need to be query from another object.

[Code]....

View 1 Replies

Actionscript 3 :: Prevent Displaying Of Some Data In Last Row Of Flex Datagrid?

Jan 6, 2010

I have some DataGrid with editable rows, which has also an option to add new row 'dynamically'. I mean, last row has some default data (e.g. "CLICK HERE TO ADD NEW ROW") and when user clicks on it, he can edit that value and new row will be eventually inserted.

However, I also have a column in same DataGrid which doesn't come from DataGrid's DataProvider. That column is used to delete specific row and it should only display clickable image with associated mouse click action (within custom itemRenderer).

[Code]...

View 1 Replies

Flex :: DataGrid - Presenting Custom Tabular Data

Feb 5, 2010

I'm currently building an application that is presenting tabular (fetched from a webservice) data and have squirted it into a datagrid - seemed the most obvious way to present it on screen. I've now come across a few limitations in the datagrid and wonder how I might move forward. The data is logically split into groups and I would like to be able to have subheadings in the grid whenever I move to a new group. I would like to be able to highlight individual cells based on their content relative to other values in the row - ie highlight the cell with the highest value in the row. Is this possible with the standard datagrid?

View 2 Replies







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