Flex :: ItemRenderer Hieght (and Height Changes) Not Reflected In AdvancedDataGrid Row

Sep 14, 2011

I have an AdvancedDataGrid with variable row height set to true.I have written a cutsom item renderer based on the DataGroup spark component. Each row in the grid has multiple entities to display, the x position and width of the entites are based on the data of the entity itself.I have a custom layout written for the DataGroup that measures and posistions each entity based on its data. Each entity in each row can either truncate or not truncate its label. When the labels are not truncated, I calculate the actual width of the object and validate its size manualy (to force the label to have the correct width and layout all its text lines and remeasure itself) within the DataGroup's Layout's measure method to accurately measure the datagroup itself.The layouts, measuring, sizing, display, etc all work correctly. The entitys report the correct height they need when not truncating the labels, the datagroup reports the correct size it needs to draw all of its row's worth of entities (all from measure methods like they need to under the UIComponent lifecycle).When inside the AdvancedDataGrid itself, rows are not sized correctly. The majority of the rows do not require multiple lines and display just fine. Those that require multiple lines have larger row heights, but not large enough to accomodate the entire text in most cases. The DataGroup for that row (and its itemRenderers) are clipped. Furthermore, When scrolling the grid, every row scrolled onscreen is the default 1 text line height, irregardless of data.In any case, resizing the AdvancedDataGrid (not resizing its columns, but the grid itself) forces all rows to snap to the correct desired height.Scrolling again produces incorreclty sized rows.

Additionally, the layout of each entity in the row is determined by several external factors - most commonly being visible range (along the horizontal). Changing this visible range will trigger all item renderers to resize themselves (through the custom layout class) to their new sizes and remeasuring the new DataGroup layout. This actually triggers a custom hierarchy parser which rebuilds all the ArrayCollections used inside the AdvandedDataGrid data provider, so ArrayCollections are dispatching change events that each row's DataGroup reacts to, so the DataGroup itself is invalidating its size and layout.These resizes do not trigger the AdvancedDataGrid to remeasure its row heights, and I must rezise the ADG itself again to snap the rows to the correct height.Anyone have any experience with dynamically sized rows in an AdvancedDataGrid or ItemRenderers which must forcibly make the AdvandedDataGrid re-layout its rows?

Unfortunately, I cannot provide source code as there are a huge number of classes going into this, hierarchial data, rolling up closed nodes into multiple rows, custom hierarchy parsers, a multitude of item renderers - that and its a Government contract.I have run into a similar issue with a much simpler item renderer, basically a label that will respect a max height, resize itself upto that height as its wordwrapping data will require, and then create scrollbars for itself. Again, the data sizes almost correclty when the grid is created, then changing the column width within the grid does not resize the row height as the item renderer adjusts to its new width. Only in resizing the grid itself do the item renderers resize correctly, create scroll bars, and the grids row heights are correct.The source for that item renderer:[code]Very wide column, no scroll bars, the labels measured height is shown in the row height.Smaller width column, some renderers have hit max height and are creating scroll bars, the last renderer is still using the measured height of the label.Smaller still column, all max heights are hit and scrollers are present for all labels, scrollers will select the row when used but allow scrolling so all text is viewable.

View 2 Replies


Similar Posts:


Flex :: ItemRenderer For TreeColumn On AdvancedDataGrid?

Apr 14, 2010

Is it possible to use a renderer for for a treecolumn in an advanceddatagrid and still keep the hierarchal functionality? If I use a renderer provider I lose the the arrow for the tree dropdown. I want to keep the tree functionality and change the display of the column.(and not just the folder image)

<mx:AdvancedDataGridRendererProvider column="{titleCol}" depth="1"
renderer="com.something.titleColumnRenderer"/>
titleColumnRenderer:

[code].....

View 2 Replies

Flex - AdvancedDataGrid ItemRenderer Ignored W/HierarchicalData?

Jun 13, 2011

I am using an AdvancedDataGrid with some hierarchical data. In the first column, I want to indicate whether or not the "name" field is editable by graying out the text for the "name" property of my objects. It's very odd, but when I set the AdvancedDataGridColumn's dataField property to "name", and have it in the first column, it seems to completely ignore my inline ItemRenderer. If I change the dataField property to something else, or change the column ordering so the Name column isn't first, everything suddenly works.

Let me know if any more code would help, but here is the simple ItemRenderer I'm trying to use in the first column:

[Code]...

View 1 Replies

Flex :: ItemRenderer Shows Through ItemEditor On AdvancedDataGrid

Apr 5, 2011

When not editing the cell, it shows a centered date as plain text. When editing, it shows a DateField editor. The second example is exactly the same as far as I can tell, other than the fact that it is an AdvancedDataGridColumn. Using that code with an AdvancedDataGrid, when I go into edit mode I can see the text from the normal item renderer behind the DateField editor (between the text input and calendar icon).

Example 1:

<mx:DataGridColumn id="endColumn"
dataField="endDate"
headerText="End"

[Code]....

View 1 Replies

Flex :: AdvancedDataGrid Dynamic Text Value Coloring - ItemRenderer

Apr 8, 2010

In my AdvancedDataGrid, I am adding dynamic values to cells by dragging a cell value to other cells. While copying, I am setting the value to listData and setting the Red color to the value in ItemRenderer. Everything is working fine, but when I scroll down/up, the values remains in the cells where thay are supposed to be(as I am setting to listData) but the coloring behaves wierd(as I am trying to set the color in ItemRenderer).

I don't want to store the color of the value, but I should be able to see the dynamically created values in Red color. Is there a way, I can do this? Do I need to set the color to actual dataprovider object and then check in ItemRenderer?

[Code]...

View 1 Replies

Flex :: Flex Drag And Drop Between AdvancedDataGrid With Custom ItemRenderer

Feb 26, 2011

I have implemented drag and drop between 2 AdvancedDataGrid, but the default behaviour from Flex displays the row data during the drag using the grid item renderer showing all 5 columns.

Instead, I would like to display an icon / image or my own custom item renderer during the drag and drop.

View 2 Replies

Flex :: Itemrenderer - AdvancedDataGrid And Instable Selection Of RadioButtons In Adobe ?

Mar 14, 2012

I have a problem with my AdvancedDataGrid which has inside it colums of radiobuttons.The problem is when I click on a cell in the Grid, the Radiobuttons selection become instable, some of the radio buttons of other colums become selected.The behavior I want is that when the selects the RadioButtons(the circle or its label), it become selected and not all the Cell in which the radioButton is.Here my code:

for (var idxStudio : int = 0; idxStudio < p_studios.length; idxStudio++) {
innerColumn = new AdvancedDataGridColumn();[code]....

View 1 Replies

Flex :: Setting The AdvancedDataGrid's Row Height While AdvancedDataGridRendererProvider Rendering

May 10, 2011

Not able to setting height of row in AdvancedDataGrid using custom AdvancedDataGridRendererProvider datagrid renderer.

Snapcode as here

<mx:AdvancedDataGrid id="docId"
visible="true"
width="100%" height="100%"

[Code].....

View 1 Replies

Flex :: Changes To Mxml Not Reflected In Browser

Oct 7, 2009

I have a Flex project and am using a trial version of Adobe Flex Builder 3 to build it.

I do the following:

1. Change an mxml file in the project (for simplicity, assume I changed the text in a label).

2. Right click on the project, Export, Release Build

3. Right click on the main mxml file, Run As -> Flex Application

A browser window opens, everything runs fine, but I cannot see the change I made in step 1.

I thought the browser (tried with IE, Chrome) might be caching stuff, so I tried after deleting all temporary internet files, but I see the same behavior.

View 2 Replies

IDE :: Get Width At A Given Hieght?

Mar 31, 2009

The best idea I had was getting the bounding box width, looping through that with point tests, and returning the number of hits

View 1 Replies

Bind A Flex Component's Height To Height Of Browser Window?

Nov 10, 2009

I want to constrain the height of a flex component to the height of the browser viewport.

The component's children are populated from a database table using a repeater, and are basic checkboxes. There are enough of them that the flex app ends up being about twice the height of the screen, which means some of the rest of the layout goes crappy on me. How can I force the component that contains these to limit itself to the size of the viewport?

View 4 Replies

Flex :: Setting Spark List Height To Its Content Height?

Apr 1, 2010

How to set a Spark List height to the height of its content?Tried this:

var lastRow:IVisualElement =
myList.dataGroup.getElementAt(myList.dataGroup.numElements - 1);
myList.height = lastRow.y + lastRow.height;

It works in case of a single item, but lastRow is null in case of more items.

View 5 Replies

Flex :: Layout - Set Height Of Accordion To Height Of Tallest Child

Apr 5, 2010

By default the height of an Flex Accordion container is the height of the initially selected child. I'd like to be able to set the height to the tallest child so that no resizing or scrolling is necessary when other children are selected. I do not want to use the resizeToContent property. I want the size of the container to stay constant no matter what child is selected.

My current thought is to extend the accordion class setting the creation policy to "all" and then override the measure function to loop through all the children and find the tallest one and use that for the height. This seems a little kludgy though, so I'd like to know if there is a better approach. Ultimately my question is: is there a way to set the size of an accordion container such that the container never resizes and scoll bars are never necessary to display any of the children?

View 1 Replies

ActionScript 3.0 :: Change Is Not Reflected In The Copy In The MovieClip?

Sep 3, 2009

I'm having a bit of a problem here. The following code, it seems to me, should print '2'. However, it prints a '1'.

[code]...

Am I missing something? I came from a VB.NET background, where a call like this would update the value of 'a'. And, on a related note, if I have a variable in my document class that I stick in a MovieClip, then I update the variable from my document class, the change is not reflected in the copy in the MovieClip Is there a way to overcome this?

View 8 Replies

ActionScript 3.0 :: Changes To Variables And Elements Are Not Reflected When One SWF Is Loaded Into Another

Apr 23, 2011

I am trying to figure out why changes to variables and elements are not reflected when one SWF is loaded into another. main.swf

[Code]...

When the main file is tested the out put of the traces is 50 & 300 which is what the variable and the bg object are set to at the top instead of what they changed to in the productsLoaded(event:Event) function. It's as if the myloader listener is ignoring changes to variables & elements inside of the loaded SWFs listener function. Seems wrong and very confusing.

View 1 Replies

Flex :: Represent HTML Table Structure In Flex DataGrid Or AdvancedDataGrid?

Feb 12, 2012

I'm using Flex 4 and I need to render the data that resembles HTML Table with row span in a Flex component.My inclination was to use a DataGrid but I believe that rowSpan is not supported for that component. I looked at the AdvancedDataGrid but the user does not want to have a tree-structure in any of the columns. Looking to see if there are any hints/tips for modifying the DataGrid or AdvancedDataGrid to produce an "HTML Table with rowspan" look.

View 1 Replies

ActionScript 3.0 :: Bitmap Width Change Not Reflected In BitmapData?

Feb 17, 2010

I have a small bitmap, and it's one that's going to be scaled to be much larger then added to another bitmap. So I have the bitmap and I changed to width to make it larger, then when I use copyPixels to place this bitmap onto the main bitmap the image added is the original bitmap, not with the width changed. How can I make it reflect the changes?

View 3 Replies

Flex :: Make Height Of SWF == Height Of Content?

May 26, 2009

I am going to embed a Flex app on an html page. The html page is already going to have a scroll bar to scroll up and down. The contents of the flex app are very dynamic, and I don't want to have an extra scroll bar when there is already one. So is there a way to make the height of the swf match the height of the contents of the swf?

View 2 Replies

Flex :: Detect If Flex AdvancedDataGrid ItemClick Is Actually A Drag?

Sep 2, 2010

Is there any way to detect if AdvancedDataGrid itemClick event is actually caused by the user dragging? I'd like to take action on click, but ignore drag.

View 1 Replies

Flex :: Get AdvancedDatagrid To Display Just One Row?

Aug 5, 2009

I have an AdvancedDatagrid, whose dataProvider is an ArrayCollection that contains 1 row of displayable stuff.Flex continues to display about 6 rows, the top one filled, the rest blank.I've set the rowCount="1", with no luck.

View 3 Replies

Flex :: AdvancedDatagrid MultipleSelection?

Jun 3, 2010

after multiple Selection in a advanced datagrid, I want to check if the clicked row, was already selected. Anyway my idea below (in the nested if clause I want to check if the newly clicked item's processing data is already in the added Array Collection) is not working, but I assume there must be a better way to differiante if an click was made on a already selected row.

model.processingData = out;
if (model.selectedIndices.length > 1){
//check if item already added

[code].....

View 1 Replies

Flex :: Add Row Dynamically To AdvancedDataGrid?

Dec 14, 2010

I would like to add new row on the fly (runtime) to my AdvancedDataGrid.I can add it to the data model, but couldn't find a way to make the table render and show the new row.What i am seeking for is to create an effect of expandable item, where clicking on row will show "additional information" (like a drawer) and clicking on row expand button will reveal it's children.I saw examples of this for dataGrid (http:url...), but not for AdavancedDataGrid.Only way I found to do this is to add a new child and use openItem, but this cause the other children to be visible as well.

View 1 Replies

Flex :: AdvancedDataGrid GroupingField?

Sep 9, 2011

need my AdvancedDataGrid group by the name of the person, but I'm having trouble because the groupingField not accept "objectPeople.idPeople"

the name of the groupingField not accept "objectPeople.idPeople"?

GroupingField name="people.idPeople" <--error??

View 1 Replies

Flex :: Get Item From AdvancedDataGrid Given Index

Jul 7, 2009

I've got a subclass of AdvancedDataGrid showing a tree-like data structure. How can I, given the index returned by calculateDropIndex, get the item at that index? After reading through reams of code, it seems like the least terrible way is:

var oldSelectedIndex:int = this.selectedIndex;
var mouseOverIndex:int = this.calculateDropIndex(event);
this.selectedItem = mouseOverIndex;
var item:* = this.selectedItem;
this.selectedIndex = oldSelectedIndex;

The other option seems to be tinkering around with the iterator property... But, judging by the way I've seen it used, that will get pretty harry pretty quickly too. So, how can I get the item at a particular index in an advanced datagrid without going insane?

View 3 Replies

Flex :: Execution Timeout In AdvancedDataGrid

Oct 25, 2010

I've a problem, I'm using an AdvancedDataGrid. It loads about 3000 records with about 20 columns. I constantly get Flex execution timeout because the grid executes a lot inside LayoutManager. How can I make it asyncronousely or faster at all?

View 2 Replies

Actionscript 3 :: Print AdvancedDataGrid From Flex 4

Nov 9, 2010

I have an AdvancedDataGrid and need to export it as PDF for printing. Can you suppose me some useful links or ideas on that topic?

Note : is another better sugestion that make this possible, working with Java? Need a quick response.

View 1 Replies

Flex :: AdvancedDataGrid: How To Tell How Many Rows Are Currently Visible

Mar 8, 2011

how to query an ADG (or its rows) to figure out how many rows are currently visible (i.e. not collapsed) when displaying different levels of a hierarchical collection?In other words I'd like a function that tells me that 7 lines are visible in this view and 1 line is available in this one.

View 2 Replies

Flex :: Sort Columns In AdvancedDataGrid?

Mar 15, 2011

I'm making an application where I display an AdvanvedDataGrid with one column with dates(in format DD/MM/YYYY) and another with datetimes (in format HH:MM). I'd like to sort dates according with the datetimes as well(just clicking in the header of the column), there is an examplen of the expected behaviour:

02/02/2011 | 10:42
03/02/2011 | 09:45
02/02/2011 | 11:45
03/02/2011 | 11:30

[Code]....

_currentDatosBusqueda is an arraycollection I receive from the Server (with the correct format of dates and datetime).

View 2 Replies

Flex :: Expand A Row Of AdvancedDataGrid Without Using HierarchicalData?

Aug 4, 2011

Expand a row of AdvancedDataGrid without using HierarchicalData?[url]...

View 2 Replies

Flex :: ContentBackgroundAlpha Has No Effect On AdvancedDataGrid?

Aug 9, 2011

I am trying to make the AdvancedDataGrid blend into the background by setting contentBackgroundAlpha=0. It doesn't do anything. How come?

View 1 Replies







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