Flex :: Add A Datagrid Row On Key Down Event?
Oct 8, 2009
I have a datagrid with one row intially. When I click on the first row, i.e on key down event, I want another row to be added. Earlier I had a button, on clicking which I added the row. But now I want the row to be added automatically once I click the first row. How to do that?
I added keydown event to the datagrid, but it threw some error.
Can someone help me? I have given my code here. I have a text box and a button in the task component. When I click the text box in the task component, I want the addTaskRow function to be called..
[Code]...
View 2 Replies
Similar Posts:
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
Jan 16, 2012
I'm loading some images from a database using a PHP script through CodeIgniter, but when I try to add an event handler to do some stuff with these images, Flex compiler is showing me an error:1180: Call to a possibly undefined method cloneCar.Why I can not add an event handler in this context?
<mx:Accordion>
<mx:Form id="menu5" label="Prueba" width="100%" height="100%" backgroundColor="#707070" icon="{roadIcon}">
[code].....
View 1 Replies
Jun 9, 2009
The problem can be summarized as when clicking an item in datagrid, the text area shows the value of the item, but here the compoents are separate and hence events need to be dispatched.
[Code]...
View 1 Replies
Apr 15, 2012
Flex data grid has 1 default row created. When user clicks on the second row, a new row needs to be created and made editable.
Here is what works already - user tabs over the columns and when the user tabs while in the last column, a new row is created with default values.
Here is also what already works - user click a button outside the grid, which adds a new row.
(itemEditBegin and itemEditEnd have been implemented)
Here is what does NOT work: When I "single click" on the second row (no data yet - row is null), how do I detect that the currently clicked row is the second row and make it editable? Can I figure out the rowIndex from MouseEvent and use this to add a new row?
Find code below:
<mx:DataGrid id="myGrid" editable="true" click="clickEvent(event)"
itemEditEnd="endEdit(event)" itemEditBegin="beginEdit(event)" variableRowHeight="true" >
[Code]....
View 2 Replies
Mar 7, 2012
Recently I am working with Spark DataGrid. Before I was using AdvancedDataGrid. In that I was capturing itemDoubleClick event. But I am not able to find such a event in SparkdataGrid. So I want to capture double click event on single row of DataGrid. Some people told that, I have to use my custom ItemRenderer to do that. But is there any way to capture itemDoubleClick event in Spark DataGrid without creating custom ItemRenderer ???
View 1 Replies
Jan 13, 2011
I am working with flex's datagrid. I have a DataGridColumn defined as the following, where labelFunction would allow me to display a custom text. I am also using a itemEditEnd handler on the grid to manipulate the entered data for this column. The purpose is to take the user input and split it then store the result in different properties other than "fixedValue". My problem with this approach is that I can't find a way to prevent assignment to the fixedValue property (which doesn't exist).
And using event.preventDefault() in the itemEditEnd handler would stop other events from happening like changing the row from edit mode to the view mode. My question is that if there is other way to achieve the same thing, or a way to just prevent the assignment of the "dataField" data. I am using the dataField to identify the column I am editing. Leaving it null might not be an option.
<mx:DataGridColumn id="columnFixedCurrency" labelFunction="fixedCurrecy_labelFunc" dataField="fixedValue" headerText="Price"/>
View 1 Replies
Mar 16, 2011
I am trying to figure out how to override the default paste logic in a Flex 4 DataGrid ItemRenderer. Does anyone know how to do this?I am trying to capture the event when a user hits Ctrl-V while a cell in the DataGrid has focus and override the logic there.
View 1 Replies
May 23, 2011
All i have a flex editable datagrid. By default if i press the left navigation arrow key , it moves to the left but not to the next cell. I would like to override the keydown event such that if the left navigation arrow key is pressed down i set the focus to the next cell on the left.
In short the user needs to be able to navigate using the keyboard through the cells using just like in excel(currently the arrow keys move between characters within a cell).
View 1 Replies
Feb 26, 2011
Which event is fired after the data is loaded into datagrid or combobox ? (Assuming the dataprovider is set to the datagrid).
View 1 Replies
Sep 16, 2011
I have a DataGrid, and what I would like to do, is when a user clicks on a row to select it, check a certain condition, and if it's met prevent the row from getting selected and keep the old selection intact.
View 1 Replies
Mar 20, 2010
I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong?
View 1 Replies
Mar 21, 2010
I'd like to have a double click event on a datagrid in Flex3. The following example only works if the Accordion (id = "mustBeSecond") container comes after the DataGrid. Why is the order of the components important and what can I do to prevent this behavior? (The example does not work. If you change the order of "mustBeSecond" and gridReportConversions" the example works fine)
<mx:Script>
<![CDATA[
import mx.controls.Alert;
[code].....
View 1 Replies
Nov 4, 2011
Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.
View 3 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
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
Apr 12, 2011
I have editable grids which are 2-way binded to my model. What I want is to validate my data when user edits any cell before it get updated in model. I have applied my validation at ItemEditEnd handler, but, I want to apply validation in between itemEditBegin and itemEditEnd events.
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
Jul 10, 2006
I have a dataGrid which i've populated from an XML file.I want to be able to click a row and to use information fromthat row. This seems fine at first, but then when I click theheaders to change the sort order, the data isn't in the same orderas the XML file anymore, so the itemIndex doesn't refer to the itemanymore - only the position in the datagrid.
View 1 Replies
Sep 1, 2011
I have 2 questions: 1. What would be the event to capture the fact a scroll has taken place in a datagrid?
2. Does anyone have any suggestions on how one could disable the scroll of the datagrid when a user clicks a cell then drags out of the datagid?
View 1 Replies
Jul 20, 2011
I wanna disable click event of datagrid of top columns, which is showing catagoeries string values.
View 1 Replies
Apr 3, 2006
Right now iam working on dataGrid component.There is an event for cell press :
Code:
listenerObject = new Object();
listenerObject.cellPress = function(eventObject){
[code]......
View 3 Replies
Aug 22, 2011
I hava a custom component and it contains a child icon. If I add a mouse-click event listener to both component(click-listener1) and icon(click-listener2), the event dispatched sequence is click-listener2, then click-listener1. I can understand it. But if I add a custom event to component (listener1), and mouse-click event to icon(listener2), when icon is clicked, the component will dispatch the custom event. In my test, the event dispatched sequence is listener1, then listener2. It doesn't match with event-bubbles rule.
In my opinion The custom event is dispatched in listener2, which triggers listener1. Why event flow sequence is not listener2, listener1?
In component.
icon.addEventListener(MouseEvent.CLICK, iconClickHandler);
private function iconClickHandler(event:MouseEvent):void
{
[Code].....
View 1 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
Apr 28, 2011
What is the event that gets fired when you click on a datagrid column to sort it? I could use that to know which column is getting sorted and hence have a common sortcomparefunction for all columns.
View 2 Replies
Apr 12, 2009
I am having trouble using a custom event in flex. I need to dispatch an event from inside two nested components and receive it in the main application file. The basic set up is a main application file importing a custom "gallery" component.
[Code]..
View 1 Replies
Aug 11, 2011
I have a TabNavigator, and each tab is a Module. One of the modules is labelled Units and the full code of the module is posted in this post. There are several problems:
1) Forms are not populated with data from the datagrid selection.
2) Selecting a row and clicking delete gives the very-common error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
A trace on the valueObject unit within the selectionChangeHandler function gives NULL. Why? Note: In other modules (other tabs of the TabNavigator), I have DropDownLists populated with units. This means that the valueObject Unit is defined in the other modules. However, valueObjects should be private to modules, and not shared.
[Code]....
View 1 Replies
Feb 4, 2011
i have a problem using the itemRenderer functionality. When using an ArrayCollection the visible Data in the DataGrid using the itemRenderer will be rendered just fine. But if i start scrolling the entries are repeating in the cells using the renderer. The cells are not filled with date according to the id. What mistake i'm doing here.
I read a lot of the explainations like:
[URL]
here is the code for the set data function (itemRenderer is extending HBox):
override public function set data(value:Object):void {
_data = value;
if(data!=null)
[code]....
View 1 Replies