Flex :: Row Specific Limits On A NumericStepper In A DataGrid?
Sep 30, 2010
I have a datagrid in Flex 4 with a NumericStepper as editor for a numeric value. I can set pre-defined maximum and minimum values for the NumericStepper, but I need to be able to have different limits for each row in the DataGrid. How can I do this?
This is the code for the datagrid:
<mx:DataGrid x="0" y="45" width="272" height="525" dataProvider="{dp}" variableRowHeight="true" editable="true" id="equipmentDG" verticalAlign="middle">
<mx:columns>
[Code].....
but now I get a StackOverflowError when I click on the cell to change the value. I posted a new question regarding that here: [URL]
View 1 Replies
Similar Posts:
Oct 1, 2010
I have a DataGrid with a NumericStepper as the item editor for one of the columns. The numeric stepper is supposed to get its max an min values from the data for each row. My MXML is like this:
<mx:DataGrid x="0" y="45" width="272" height="525" dataProvider="{dp}" variableRowHeight="true" editable="true" id="equipmentDG" verticalAlign="middle">
<mx:columns> [code].....
View 1 Replies
Mar 19, 2008
I have this code for uploading files to a PHP-script. It works fine when I place my NumericStepper(id="sida") outside the DataGrid but when I try to put it inside, Flex can't find the property "sida". What code goes where to solve this, anyone?
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="*" headerHeight="8"
[code]........
View 2 Replies
Jul 18, 2010
I have a dataGrid component in flex. My grid has few rows. I simply want to make the last row bold. I just can't figure how to do it.
I thought about an idea : create a factory that gets parameters so that i can pass the itemRenderer the total count of rows. But, i don't know how to check the current row in the itemRenderer itself (and compare it to the total rows).
View 1 Replies
Mar 26, 2011
Coming back to flex after not using it for a while, trying to load some xml (generated by php) into a datagrid using dataprovider to create a simple grid showing the daily high and low temperatures over the course of a week. I can get the data to display in my datagrid, but the columns are loading in random order. (So friday is coming before monday etc.) How to assign specific data to specific datafields.
Here's the flex code; (updated to working code. Note that the dataFields simply contain the names of the xml tags and/or the names of the tags within those tags)
<?xml version="1.0" encoding="utf-8"?>
<fx:Declarations>
<s:HTTPService id="weather" url="[URL]" result="weather_resultHandler(event)" fault="weather_faultHandler(event)" />
</fx:Declarations>
[Code] .....
View 1 Replies
Jun 21, 2011
I have a custom FilterColumnHeaderRenderer with an HBox, inside a Label for the Column Header, a Textinput for the filter text and Label to clear the filter. Now I want that the column sorting only takes place on clicking the title.Currently the I use the sortCompareFunction on HeaderRelease for the whole columnHeader.[code]
View 2 Replies
Jun 15, 2011
Is there a way to make NumericStepper shows leading 0 to numbers which is below 10 ?
(like 01, 02, 03 ... 09, 10, 11)
View 2 Replies
Mar 9, 2010
I have a NumericStepper declared as a UIComponent:
<![CDATA[
private var component:UIComponent;
component = new NumericStepper();
]]>
I need to change the .maximum value of the NumericStepper but due to the UIComponent not having a .maximum property the following code fails with the error: 1119: Access of possibly undefined property maximum through a reference with static type mx.core:UIComponent.
component.maximum = 11;
how would I define a property in this scenario?
View 2 Replies
Sep 1, 2011
I am trying to use the NumericStepper component in Flex and would like to give its textField (not just the whole thing) an id but not sure how. I have already given an id to the NumericStepper itself but would like to give an id to its textInput field.
View 1 Replies
Dec 19, 2011
I want to restrict my NumericStepper so that you can't type invalid characters into it (like a comma). I'm trying this, and it works:
<s:initialize>
stepper.textDisplay.restrict = "0-9 - .";
</s:initialize>
<s:NumericStepper id="stepper" />
Except the negative sign can't be typed anymore, even though I specify it. If I do it directly on a TextInput, it works:
<s:TextInput restrict="0-9 - ." minimum="-10" />
Why doesn't this work?
View 1 Replies
Jan 16, 2012
I have the following NumericStepper:
<s:NumericStepper id="estimertTidCell" value="{isNaN(hostComponent.estimertTid)?0:hostComponent.estimertTid}" stepSize="0.5" maximum="5" change="hostComponent.estimertTid=estimertTidCell.value"/>
When i set the value to e.g. 1.5 through the NumericStepper and store the value, the alert in the following code correctly displays 1.5:
private var _estimertTid:Number;
[Bindable]
public function get estimertTid():Number {
[code]....
Problem: My problem is that once the NumericStepper refreshes, or reloads the variable, it displays 2 instead of 1.5, or 4 instead of 3.5 etc. Anyone got any ideas of what is causing this behavior? I would think that by setting the stepSize=0.5 it would correctly display those decimal numbers.Additional information: When i display the same variable in a spark Label, the value is correctly displayed as a decimal number.
View 1 Replies
Jan 21, 2011
When using the NumericStepper I want to force the user to only be able to edit the value using the NumericStepper's up and down arrows. I do not want the user to be able to type in a value directly. How can i do this in flex 4?
View 2 Replies
Jun 21, 2010
how to Load SPECIFIC XML items to datagrid?
View 1 Replies
Apr 1, 2005
I want to sum up a total of a specific column in a datagrid but am having problems, I'm using Flash MX 2004 Pro.
Here is what I have done:
Inserted a DataGrid, named it UserGrid.
Created a dynamic textfield called total.
I have the folllowing AS on frame 1:
[AS]
import mx.controls.gridclasses.DataGridColumn;
UserGrid.addColumn(new DataGridColumn("Title"));
UserGrid.addColumn(new DataGridColumn("Quantity"));
UserGrid.addColumn(new DataGridColumn("Price"));
[Code]....
View 14 Replies
Dec 23, 2009
I have a DataGrid populated via an Array. The last column in the DataGrid uses an ItemRenderer (Button). I want to show the Button in certain rows but not in others (leave those empty). I've looked everywhere for an example or even a clue how to do this (tried labelFunction on DG, etc.) but can't find anything about it.
View 3 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
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
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
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
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
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
Dec 29, 2009
I am trying to select and highlight a specific row on the datagrid in an embedded swf everytime the movie loads. I am using flash cs3 and actionscript 3 , published on flash player 9. anyone done anything similar? Did quite a bit of searching none of the methods actuall seemed to work.
View 1 Replies
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
Feb 1, 2009
i am having problems with setting the default value of the numericstepper. what is happening is that each time i change the value of Ath in the numeric stepper then change the frame the Ath value changes to it's max value. this happens with all of the numericsteppers that i set a default value with using actionscript. all relevent code is bellow along what each frame is for/does
[CODE].....
View 1 Replies
Jan 27, 2010
I have a RadioBtnGroup with (8) RBtn, and also One NumericStepper which uses the change property to address a changeHandler, and to count appropriate values up or down. At the moment I can only select the first RBtn and the changHandler' associated with it, but now I'm trying to find a way to use the change property of the NumericStepper multiple time (as per One RBtn to One changeHandler) within a switch or case statement ??? To try to avoid to use more than the One NumericStepper. Note: I do have to use One changeHandler per RBtn! as all the values from one to the other are different.
View 1 Replies
Mar 23, 2009
I was just wondering: When using the NumericStepper-component, is it possible to have a range from say 100 to 200 with all integer values in bewteen (i.e. stepSize = 1), but have the value increase/decrease by another value (e.g. 5) when pressing on of the arrows?
View 2 Replies
Sep 14, 2009
I need to set the text value of the ComboBox and numericStepper when an item in a list is pressed. I understand that the value of the ComboBox and NumericStepper is read only. How can I force these components to show the value that I want?
View 3 Replies
Feb 3, 2010
I have a NumericStepper in my stage, and I have a Keyboard listener which listens for pressed keys.The listener works fine until I change the value in the NumericStepper.I think it's the textField in the NumericStepper that ruins it.
But i've tried
myNumericStepper.textField.enabled = false
and
myNumericStepper.textField.selectable = false;
But nothing works.
View 2 Replies
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
Feb 6, 2010
I have a keyboardEvent which listens for pressed keys. I also have a NumericStepper. If I change the value in the NumericStepper, the keyboardEvent stops working (I think the reason is that the textField in the numericStepper, or the numericStepper itself, gets active). So, I've tried alot of things.
numericstepper.textField.enabled = false
numericstepper.textField.selectable = false
numericstepper.textField.editable = false etc...
But nothing seems to work.
View 3 Replies