Even w/o IDropInLIR, you can get at .owner (in 2.0.1)
In measure, you should set measuredHeight. Height will work, but isn't my preference. SetActualSize is used in measure to measure text, but may not be needed here ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, September 19, 2007 3:39 PM To: [email protected] Subject: RE: [flexcomponents] Re: get and set the height of a row in datagrid Hopefully Alex will see this and correct me, but... To get the specified rowHeight, your renderer will need to implement IdropInListItemRenderer. Then you can get listData and I think listOwner, which is the DG and has the rowHeight property. Then in the renderer's overrides measure() method, you will calculate the heights you want and finally set the height of the renderer itself. Look at the measure() function in the stock ListItemRenderer.as class. As I recall, setActualHeight() is a key call. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Sakri Rosenstrom Sent: Wednesday, September 19, 2007 3:00 PM To: [email protected] Subject: Re: [flexcomponents] Re: get and set the height of a row in datagrid Thanks Tracy for taking the time :) What I need is to control the height of other components, based on the height of a row, and possibly vice versa. Ideally do a Math.max(row_height , other_component_height) and use the result for the height of both. Does that make sense? Thanks again! Sakri On 9/19/07, Tracy Spratt <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: An important precept in working with item renderers is the fact that the renderer instances are recycled. Only those actually visible, plus a few for buffering, are actually created. When the underlying data is changed, or when the list is scrolled, the renderer instances are updated to display the new item's data. This means that essentially all control of the renderer must be driven from information in the dataprovider item (there can be exceptions) You haven't really told us what you want to accomplish. The DataGrid's default item renderer is capable of variable row height itself. What do you need beyond this? Tracy ________________________________ From: [email protected] <mailto:[email protected]> [mailto:[email protected] <mailto:[email protected]> ] On Behalf Of Sakri Rosenstrom Sent: Wednesday, September 19, 2007 11:32 AM To: [email protected] <mailto:[email protected]> Subject: Re: [flexcomponents] Re: get and set the height of a row in datagrid Thanks for that... so I need to somehow access appropriate instances of item Renderer, then I can get and set its height? Just one more, suppose I change the height of one renderer in a row, will it automatically trigger updateDisplaylist() on some parent, or the other rendrers within the same row? Thanks for your help! Sakri On 9/19/07, brainny2002 < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: I faced similar challenges in my first flex project and actually i dont think there is a direct solution to that.You can only manipulate datagrid columns as u which and not rows.The rowHeight property won't help either if u r trying to set specific row height. what i did was to first set the variableRowHeight property to true. then implement item renderers.My custom Item renderer would then set its own height based on the data property passed to it. Hope that helped?. MayorBrain [EMAIL PROTECTED] <mailto:brainny2002%40yahoo.com> --- In [email protected] <mailto:flexcomponents%40yahoogroups.com> , "sakri_rosenstrom" <[EMAIL PROTECTED]> wrote: > > I'm sure this is simple, but after an hour of searching (docs, google, > this group), the solution evades me... > > I need a datagrid with variable row height, I need to access the > height of individual rows like my_datagrid.getHeightOfRow(3), and set > the height of that row... > > any help would be (as always) greatly appreciated! > > > Sakri >
