Flex :: Cant Edit Item In Datagrid With Override Set Data Method?

Mar 12, 2010

I've a custom itemRenderer for my datagrid. To set the actual data I use the following method:

override public function set data(side:Object):void{
...
}

As soon as I use this function the cell doesn't show up any item Editor anymore. Why is that? When I remove this function the itemEditor is working but with the wrong initialization data.

View 3 Replies


Similar Posts:


Flex :: Override The Column Item Renderers For The Datagrid Component Dynamically

Feb 24, 2011

I have a view component called viewBase where I defined a advanced datagrid with few item renderers for datagrid columns. Now I have a requirement where I need to use the same view viewBase component, but not required to use any item renderers.

how to override the itemrenderers which are declared in a view component?

View 1 Replies

Flex :: Using An Inline Item Renderer To Edit DATAGRID?

Feb 27, 2011

I have a problem in my datagrid itemeditor This is my data grid component

<mx:DataGrid id="lessonPlanDataGrid" x="10" y="10" dataProvider="{studentLessonPlanArray}" height="271" width="270" editable="true">

[Code]...

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 :: Datagrid, Select An Item Given My Data Attribute Values?

May 6, 2010

I'm using a custom component CheckBoxList DataGrid (http://blogs.adobe.com/aharui/2008/02/checkbox_selection_in_datagrid.html) and as dataProvider I have an ArrayCollection with items such this one:

name="item name" selected="true"

I would like the CheckBox list updated when the selected attribute is set to false or true in the data model.

View 1 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

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

Flex :: Override A Protected Method From UIComponent?

May 30, 2011

I want to create a custom button in ActionScript. [code]...

View 2 Replies

Flex :: Override Paste Event In DataGrid ItemRenderer?

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

Flex :: Edit ArrayCollection Through Item Renderer?

Jun 16, 2011

I use a spark List with a custom item renderer and an ArrayCollection for dataProvider.

The ItemRenderer looks something like

<mx:TextInput id="txtValue1" text="{data.myFirstValue}"/>
<mx:TextInput id="txtValue2" text="{data.mySecondValue}"/>

However, even though I change the text in txtValue1 or txtValue2, those are not actually changed in the object inside the ArrayCollection.

myFirstValue and mySecondValue are decorated with the [Bindable] tag.

My understanding is that if the text property is set to be bound a certain property, the changes should be automatically applied.

So the HACK (or so I think) that I use is to listen to the focusOut event of each textbox, and access the parent data provider and set the the values manually.

View 1 Replies

Actionscript :: Override Flex Netconnection Call Method That Uses Variable Arguments

Jun 16, 2010

I need to override the call method from NetConnection class, the signature of the method is:

[Code]...

View 1 Replies

ActionScript 3.0 :: DataGrid : Grouping Data By Item Property?

May 25, 2009

group items in a DataGrid by an item property, fer example:Say you have a list of products, and the products belong to categories, like, Summer products, Winter products...is there anyway to group products in a DataGrid under separate headers? IE: Winter (all winter products follow) Summer (all summer products follow). I can already order by category, but instead I want to do this:

Winter Category
1. Winter Product 1
2. Winter Product 2
3. Winter Product 3

[code]...

Do it need to create a DataGrid for categories and nested DataGrids for products per Category? Or is there some built-in way of grouping within a DataGrid?

View 1 Replies

Flex :: How To Edit Item In DataProvider With Support For Cancellation

Jul 9, 2009

I have a DataGrid of objects, and I want to modally edit them; pop up a dialog, change the item, and if the user clicks "Ok", save the changes back to the original item, and if they click "Cancel", do nothing. It seems obvious that if I simply pass in a reference to the original object and change it using data bindings to the fields in the edit form, I won't be able to cancel my edits. How can I support that capability?

View 1 Replies

Flex :: Override Data Tip Circle?

Jan 31, 2012

In flex charting you can customize the box which displays datatip information, but is there any easy way of changing the little circle which is displayed next to the datatip box?

http:[url].....

I've found the method positionDataTips() in ChartBase which appears to do the drawing of the circle. I was going to subclass LineChart and override the method with my modified version of it. However, this method needs access to a lot of private instance variables which are only accessible to ChartBase.

View 1 Replies

Actionscript 3 :: Flex Override Public Function Set Data

May 11, 2010

I have a datagrid with itemRenderer in datagridcolumn as my custom component(c1). I am getting the dataprovider data in custom component by overriding the set data function, it is fine. But now my custom component(c1) is also having another custom component(c2).

Now the doubt is - how to get the dataprovider data in c2 component?

View 1 Replies

Actionscript :: Flex Edit DataGrid Cell On Click Only When Previously Selected?

Feb 27, 2010

I need to modify the behaviour of an editable datagrid to this:

-Single-click on a row, doesn't make the cell show a text input field (only selects the row)

-Double-click on a row, doesn't make the cell show a text input field either

but

-Clicking a cell in an already selected row, shows a text input field ready to be edited.

View 1 Replies

Actionscript 3 :: Flex - Why Override Custom Event And When To Override It

Aug 15, 2010

I always have a question about override custom event. I am not sure why or what do to inside override function. I searched google but didn't get too many feedbacks. EDIT: My projects seem work fine even though I use my custom event without override. Anyone could explain it?

View 2 Replies

Flex :: Datagrid And Inline Item Rendered

May 24, 2011

I have a datgrid with two inline item renderers. The dataprovider for my DG is a nested object (objects within objects within objects i.e 3-layered). Main Object - 1st Level

[Code].....

I use 2 item renderers (one for each datagrid column) which loops thro the 2nd level object1 and 2 respectively (the 2nd level object is a dynamic array of objects, in that the number of objects within keep changing). Within the item renderer I loop thro the 2nd level object using a foreach and then display the data. The data is a linkbutton, which when clicked , calls a remote object function to delete the data from the database

now on the result event of the remote object function call, i call the function to repopulate the DG, so that the updated data is displayed. When i click on the linkbutton in the first row, the backend works perfectly fine (the data gets deleted from the database and the refreshed data is sent back), but for some reason, the deleted data suddenly appears in the 2nd row. When i delete it from the second row, it appears on the 3rd row (nothing happens in the backend since the data is already deleted).. and so on, till it appears on the last row and then the DG looks exactly the way it shld have looked after the first delete.

This is just the beginning. The second item renderer also displays a linkbutton, which when clicked, displays that data in the previous column (the one where this data can be deleted). When i click on 1st row, the data gets added in the previous column of the second row. and so on.. Basically, my DG is acting really weird. I overrided the set data function in the item renderer to refrsh the data and called its invalidateDisplayList. I also call the Datagrid's invalidateDisplayList function after each refresh. The behavior remains the same.

[Code].....

View 1 Replies

Flex :: Bind A Datagrid Item To A Combox?

Jun 15, 2009

I am trying to bind a datagrid item to a combox, so that when the user selects the item in the datagrid the form displays the selected data for editing, however one of my items is a combobox using a dataprovider.

I would like the item selected in the datagrid to match the selected item in the combobox, this part is fine however if my datagrid item is null then I cannot get the combox to set the selected index to -1?(the same happens if you use the CRUD wizard in Flex builder 3 for ColdFusion)I am using the following code for my custom combobox:

<mx:ComboBox
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
creationComplete="componentInit()"

[code].....

View 2 Replies

Flex :: One DataGrid Item Renderer For Multiple Columns?

Apr 30, 2010

I'm trying to create a Flex DataGrid where the firstname and lastname are shown under each other, but in the DataGridColumn

Ideally I would want to do something like

<mx:columns>
<mx:DataGridColumn headerText="Column 2" dataField="time"/>
<mx:DataGridColumn headerText="Column 2" dataField="firstname,lastname" itemRenderer="renderers.FirstNameLastName"/>

so that both values get passed to the itemrenderer, is this possible?

View 1 Replies

Flex :: Datagrid As Item Editor Gets 'itemEditEnd' Prematurely?

Apr 18, 2011

My application has a tree with a custom item renderer, which depending on the type of data at a leaf uses different components as editors. In one case I am trying to use a datagrid so that the user can choose a row that meets his needs (several columns need to be displayed), ie. similar in concept to a ComboBox.To do this I have a function assigned to be the handler for 'itemEditBegin' (for the tree) in which I'm dynamically creating the datagrid, and then using the popup manager to display it as a (modal) popup. So far so good.

However, if you click anywhere (eg. scroll down button in the datagrid) the popup disappears because the itemEditEnd event is fired - why ?In another scenario, I have a DateField setup as the editor, and the user can click on the icon to bring up a DateChooser, scroll through the months, etc. I looked at the code behind this, and it is using a popup, seemingly in exactly the same way as my code !Here is the 'itemEditBegin' code:

dataGrid = new DataGrid();
dataGrid.dataProvider = mddTable.dataCollection;
dataGrid.editable = false;

[code]......

View 2 Replies

ActionScript 2.0 :: Display Item In Datagrid In Order It Was Chosen And Remove Selected Item

Jul 20, 2010

I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]

View 5 Replies

Flex :: RowItem Saved On Tab Don't Proceed To Next Editable Item Datagrid?

Apr 12, 2012

I'm using a Flex datagrid where only 1 rowItem is editable. All the other row items are non editable. When I edit the value of the row, and press ENTER or TAB the focus is send to the next editable item in the datagrid. In this case the editable field on the next datagrid row.

I don't want this standard behaviour... I don't want the focus to be processed to the next editable item. Since the data is saved instant, it's quite strange that the focus is given to the next field. The focus has to be remained on the item that was edited.

View 1 Replies

Datagrid - 2 Numeric Stepper Components In An Item Renderer Of Flex?

Jul 7, 2009

I have to put 2 numeric stepper components in one column of a datagrid. I suppose I need to write my own item renederer code for that. How to write a code for putting 2 numeric stepper components in one coulmn of datagrid.

The 2 numeric steppers would work as time (Hour and Min) components. I cannot use readily availabel time components, and hence have to write something of the above for my own time component.

View 3 Replies

Flex :: Error While Running CheckBox Item Renderer In Advanced DataGrid

Sep 9, 2010

Getting error while run the checkBox item renderer in advanced datagrid with out data.
Error: Cannot access a property or method of a null object reference.

Code:
public function set listData(value:BaseListData):void {
_listData=value;
_dataGrid=value.owner as AdvancedDataGrid;
_dataField=(value as AdvancedDataGridListData).dataField;
}
Here value is coming null, so I am getting above exception.

View 2 Replies

Flex :: DataGrid Item Editor - DropDownList Fires Focus Out On Scroll

Feb 24, 2011

I have a data grid with a custom item editor that displays a DropDownList component. When I click the scroll bar in the component, it is firing a focus out event on the list, which is causing itemEditEnd to fire. Why the list is not keeping focus, or how to make it keep focus. I'm using Flex 4.

View 2 Replies

Flex :: Conditionally Change Icons In Datagrid Rows Using Item Click

Jul 23, 2011

I have to designed a datagrid, in first column i have to use closed lock icon. when i click a row in a datagrid the selected rows' icon should change as opened lock icon. how i can achive this task in flex 3.

View 2 Replies

Flex :: Spark DataGrid On Mobile Application Handle Scroll And Selection Item?

Dec 15, 2011

I have a spark datagrid on a mobile application, I set the

interactionMode="touch"

and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start...

How can I add the touch dalay before select the index, so if I scroll the grid the selection won't change, and it change only if I press the item without scrolling?

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

ActionScript 3.0 :: Runtime Override Of Method?

Nov 11, 2010

Is it possible for a class to override it's own methods at runtime? I know this is possible to do in JavaScript by simply assigning a new function to the method name, but this doesn't appear to work in AS3.

Example: Let's say I have a DisplayObject with many accessors and methods. The user is allowed to load a dynamic library that overrides several of the functions and methods in the DisplayObject. As author of the DisplayObject, I have no idea what methods the user's library is going to override... only that they can. IS this possible?

The only thing I can come up with so far is to literally override every single method and accessor in the DisplayObject, then performing a check whenever they get called:

[Code]...

View 9 Replies







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