CellRenderer rowHeight
Tuesday, May 16th, 2006Is it possible to change rowHeight of DataGrid row? I dont mean same heights for all rows, but just 1 single row from collection.
For example: all rows have height 25px, but 4th row has size 50px.
Is it possible? Please help i need this for my current project.
I need rows with TextField multiline, but some rows will have just 1 row (short text), and some 2 or more (longer texts)
Thanks.
tagged under:





6 Comments
Julian Sander (dr.swank)
• Visit Site
May 16th, 2006
I don’t think so. The way the UIcomponents use the cell renderer is that it reuses the same batch, just changing the actual content. What that means is that the metrics are not set for the entire rendered dataSet but rather for the visible CellRenderers meaning there is no real way to allow them to adjust for various sizes.
There may be a hack, but if you are looking for something that won’t break, then I would suggest using a ScrollPane and adding your entire list of Cell into it. You will need to write a special header class as well to sort the cells based on the events, but that may be easier then trying to get the cellRenderer to do various heights..
cheers, J
Erki Esken
• Visit Site
May 17th, 2006
DataGrid inherits variableRowHeight property from ListBase class. Docs say:
variableRowHeight : Boolean
If true, individual rows can have different height values.
Administrator
• Visit Site
May 17th, 2006
this is Flash 8 documentation? i can’t find it
DataGrid is inherited from List component, i cant find ListBase, nor anything from your text
can you paste here link on LiveDocs.
Thanks
Steve
• Visit Site
May 17th, 2006
Hi Franto, I’m guessing you were cheking out my “ListBox Alternative” because of this. Just wanted to let you know I fixed the issue you mentioned and uploaded the new zip file. Thanks for catching that.
Erki Esken
• Visit Site
May 17th, 2006
Sorry for the confusion, I thought you meant how to do it in Flex 2, not Flash 8.
kesty
• Visit Site
May 20th, 2006
I saw something like this here: http://www.tufat.com/demo/datagrid/flash7/index.html
Maybe it will help you.
PS: this solution is for 5$.
Live Preview
Leave a comment