Flex :: Renderer Grid - Doesn't Change Dataprovider
Aug 8, 2011
Is there a way to apply a renderer to a grid in a way so that it doesn't modify the values in the data provider? I have a datagrid and on one of its columns I have a customer renderer which overrides the set data function and converts the number value in the dataprovider to a word. My problem is that when I sort the grid by that column it sorts by the new value, whereas I want it to sort by the old value that was originally in the dataprovider. Here is my renderer:
[Code]...
View 2 Replies
Similar Posts:
Feb 3, 2012
I'm currently working with the OLAPDataGrid component and got stuck at a relatively simple task: I want to style the last row of the grid differently from the rest, so my cell item renderer needs to know whether he's rendering the last row with content in the overall grid, including those rows currently not rendered because they are outside the visible grid space. AdvancedGridListData's rowIndex property only gets me the row index of the renderer relative to the range of visible grid rows, i.e. when I scroll down the grid, a data item with an index greater than 0 gets the rpw index = 0.
View 2 Replies
Aug 4, 2009
In my project i used one select all button for select all checkbox at click event . But i used datagrid ,iteam renderer within checkbox so no id of checkbox then how to select/unselect all checkbox ?
<mx:DataGrid id=newdatagrid>
<mx:columns>
<mx:DataGridColumn headerText="1" rendererIsEditor="true"
[Code]....
how can i implement select/unselect all button for checkbox?
View 1 Replies
Sep 20, 2010
I'm using a data grid with an item renderer that creates a toggle button. The idea is to have a list of items and only allow one to be selected and pre-select one at start.I've got the single button selection working, meaning that when I click on on toggle button, the others are deselected.My problem is to create a way of pre-selecting an element of the data grid or simulate a click on a row and selecting the corresponding toggle button.If I use the datagrid.selectedIndex the result is a selection but the toggle button doesn't get selected.Here is the code exampleIn this example I am using the array value "selected" to define selected button, not my favourite solution but the one that worked first.The array collection:
public static const ValuesList : ArrayCollection = new ArrayCollection(
[
{ID:0, Name:"One", selected:false},
[code].....
View 2 Replies
Aug 31, 2010
i gave the tree an ArrayCollection as dataprovider that i pulled from the database, and it contains the children, but the discloser icon wont disappear on an object that doesn't have a child.i think the problem is that the renderer doesn't recognize the leaf child, wich contains a children array of length 0, or null......
View 2 Replies
Jan 16, 2012
How can I dynamically change components text size in item renderer? Here is my CustomItemRenderer.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="[URL]" xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
[Code] .....
When a button is pressed I want to access textArea2 and change font size.
View 1 Replies
Jul 13, 2009
I'm trying to change Flex 3 ToggleButtonBar dataprovider on user or admin log in. I'm trying to use 2 viewstack, and I've got a component where the login form is in the component. What should I do to define the dataprovider based on user log in?
View 1 Replies
Jan 25, 2010
I am encountering a bizarre Flex 3.4 issue. I have a class that acts a dataprovider to my entire application named "DataProvider.as":
package {
public class DataProvider {
[Bindable]
public static var email_enable:Boolean = true;
}}
In an mxml form, "Settings.mxml" I have a checkbox control which is bound to the email_enable variable of my dataprovider class:
<mx:CheckBox x="452" y="170" label="{Language.loadLanguageResource('lblEmail')}"
id="chkEmail"
selected="{DataProvider.email_enable}"
change="onChange()"/>
All is well as far as getting the value, if I set the variable in my dataprovider to either true or false, the checkbox reflects this change; however, if I click on the checkbox and change it's value, the dataprovider variable never reflects the change.
View 1 Replies
Jul 10, 2011
I have a component that contains a list that implements a custom renderer. I use this component as a tooltip, keeping one in memory and just altering the databindings as necessary.
Something like this where TTComponent is a class that extends Canvas:
<s:TTComponent>
<s:BorderContainer>
<s:List id='lstItems' dataProvider="{data.Items}" width="50%" borderVisible="false" contentBackgroundColor="#222222">
[Code]....
Now, what happens is when data containing many items is set to tt.data, the list resizes itself larger and displays fine. However, after this, if data containing few items is set to tt.data, the component momentarily displays larger than it needs to be, then resizes itself smaller.
What I'd like to do is have the component resize itself before it displays, so I don't see the resize on screen.
View 1 Replies
Aug 9, 2011
My Flex datagrid automatically scrolls to the top when I update the dataProvider (ArrayCollection). I do not want this to happen, but I still want all of the objects to update. I am developing a semi-real time dashboard for a customer's management system, that will update often. If it scrolls to the top every time it updates, it will be very difficult and frustrating to use.I've attempted to use the following techniques to prevent this, none have worked.
dataProvider = updatedDataProvider;
dataProvider.updateItem(dataProvider);
dataProvider.source = updatedDataProvider.source;
dataProvider.updateItem(dataProvider);
I've attempted to dispatch a mouse event to hold the vertical scrollbar in place, I've attempted to lock the vertical scrollbar position value in place (saving and reassigning)..
View 2 Replies
Mar 13, 2012
In flex 4.5, I have an application that has a BorderContainer that loads a spark list (mxml style - _myList and the borderContainer is stored in a library outside of the parent application) that loads an arrayCollection with an itemRenderer (I should note said itemRenderer is not an inline renderer - on selection of an item in the list, the itemRenderer expands, loads a particular control within the item renderer based on data passed from the selected item in the list) and allows the user to perform a search. This works all well and good on startup/load, until I try to change the dataProvider for the list (my app allows users to switch data sources which then creates a new dataProvider with new variables). I have tried:
[Code]...
View 1 Replies
Jun 30, 2011
I have a simple list and a background refresh protocol.When the list is scrolled down, the refresh scrolls it back to the top. I want to stop this.I have tried catching the COLLECTION_CHANGE event and validateNow(); // try to get the component to reset to the new datalist.ensureIndexIsVisible(previousIndex); // actually, I search for the previous data id in the IList, but that's not importantThis fails because the list resets itself after the change).I hate to use a Timer, ENTER_FRAME, or callLater(), but I cannot seem to figure out a way.The only other alternatives I can see is sub-classing the List so it can catch the dataProviderChanged event the DataGroup in the skin is throwing.
View 4 Replies
Feb 16, 2011
I have an array collection as the dataprovider to a datagrid. When I change a value in the arraycollection, a particular row gets updated in the datagrid. I want to get the index of that particular row. How do I get it?
View 1 Replies
Jun 23, 2009
I'm using a mx.containers.Grid to layout some data, and the last column is a set of checkboxes. MXML Code snippet:[code]Basically, I want the labels & text values to align however the Grid component sees fit. However, I'd like the checkboxes to be right-aligned. I've tried setting the width of the textValues to 100% and it does nothing. I don't want to use hard-coded pixel values/canvases/etc because it is important that this is easy to change/update.
View 2 Replies
Apr 9, 2010
Currently when sorting in a flex grid, the sort arrow that shows whether the column is sorted ascending or descending is right aligned to the column. Is there anyway to change the position of the sort arrow, such as applying padding?
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
Mar 31, 2010
Whenever I add paddingRight to a column in the flex grid, it adds the padding to the header as well.Is anyone familiar with how I can add paddingRight just to the column and not to the header? Below is the column code where I was specifying the padding.
<mx:DataGridColumn width="60" headerText="Type" dataField="Grade" headerStyleName="headerLeft" textAlign="left" draggable="false" resizable="false" headerRenderer="GridHeaderRenderer" paddingRight="5"/>
View 1 Replies
Oct 5, 2010
I have a radio button group within a data grid, whenever I attempt to change the selected radio button the web page crashes. Below is how I put together the radio button in the data grid.
MXML
<mx:Accordion>
<fx:Declarations>
<s:RadioButtonGroup id="cover"/>
[Code]....
View 2 Replies
Sep 24, 2009
I have a mx:Grid component in my flex application. But I would like to resize it by clicking and dragging in the border. This component doesn't allow doing that.I want to put a panel in each gridItem of this Grid component and resize it.
View 1 Replies
May 4, 2009
I have Flash CS4. I like the way the Vine Pattern can be animated with the Art Deco Tool, but I don't like the vines.The Grid Pattern, however, is good. But... there's no Animate check box as there is with the Vine Pattern.
View 4 Replies
Mar 16, 2005
I tried the fading grid tutorial but it doesn't work.Url...
View 1 Replies
Dec 15, 2010
I have a component where I expose the property 'questions' with the following code:
private var _questions:ArrayCollection;
private var questionsChanged:Boolean;
[Bindable("questionsChanged")]
[Code]....
In this component, I use commitProperties() to implement my logic.
I use Cairngorm and the 'questions' is in the model and hence it's defined as a source for data binding.
When the 'questions' ArrayCollection's size changes elsewhere in the application, it is not invoking the setter method in the component that is destination for the data binding.
View 1 Replies
Dec 7, 2011
ow do you display HTML formatted text in a Spark custom item renderer (Actionscript)?
Sample Code:
The html content in item.post_content displays as plain text in the IconItemRenderer messageFunction snippet below (which is just the default generated code for Icon Item renderer):
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer iconField="iconField"
iconWidth="64" iconHeight="64" labelField="post_title" messageFunction="getPost">
[code]...
View 1 Replies
Oct 17, 2010
Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.
View 1 Replies
Sep 8, 2010
I have a Datagroup with a custom item renderer the momment I bind it to XML from an http service it stops working.
[Code]...
View 2 Replies
Nov 12, 2011
I am using an component, and currently have a dataProvider working that is anArrayCollection (have a separate question about how to make this an XML file... but I digress).Variable declaration looks like this:
[Bindable]
private var _dpImageList : ArrayCollection = new ArrayCollection([
{"location" : "path/to/image1.jpg"},
[code]....
View 4 Replies
Nov 9, 2009
I have a page (below) that has a datagrid that lists "item"'s returned from an XML file (below) and when it loads it created a page in the viewstack for each item it finds (working) it also renders a page (below) inside each panel but i am having issues passing the data. Each page renders and loads but with the FIRST result of the XML data instead of each page having its own data they all have the same as the first page.
HomePage.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%"
[Code].....
View 1 Replies
Nov 24, 2009
I'd like to have an overlay that draws lines between selected items in different Flex 4 List controls.
The problem is I can't figure out how to access the x, y coordinates of the list's item renderers.
View 2 Replies
Jan 12, 2010
I need to develop Advanced Datagrid like the below attached image. So I had developed the Grid with some columns but do not know how to rendering the image in the result part of the grid. how to rendering the images in the result part.
View 1 Replies
Jul 20, 2010
my renderer contains a canvas in it, i add some title-window, every time i see my tree previously added Title-Windows are visible, i want to access each n every item in tree and remove previosly added all windows from the rendere. how access all the item renderer in AS3 ?
View 1 Replies