Only certain DG heights will have an exact integer number of rows. You cannot tie the DG height to .95 of something else.
If you know you want 10 rows all the time you would take .95 of the target, subtract the viewMetrics top and bottom, divide by 10, round down, mult by 10 add the view metrics and use that number. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of arpan srivastava Sent: Sunday, November 26, 2006 7:25 PM To: [email protected] Subject: Re: [flexcomponents] resizing the datagrid ? Hi, I have got the height calculated from the percentage of the HBox i.e. 95%. Now I have got the datagrid height and rowcount as 16 , but it does not give correct result, sometimes even an extra row at the bottom. what I have done is calling measureHeightOfItems() and passing the rowcount now it gives me the correct height of the datagrid. but is there anyway in which, if i have the datagrid height and rowcount and i can perfect result. ----- Original Message ---- From: Alex Harui <[EMAIL PROTECTED]> To: [email protected]; Flex Coders <[email protected]> Sent: Monday, November 27, 2006 2:12:35 AM Subject: RE: [flexcomponents] resizing the datagrid ? Are you saying that if you set rowCount=10 on every resize it won’t honor it? ________________________________ From: flexcomponents@ yahoogroups. com [mailto: flexcomponents@ yahoogroups. com ] On Behalf Of arpan srivastava Sent: Saturday, November 25, 2006 3:59 AM To: Flex Coders; Flex Components Subject: [flexcomponents] resizing the datagrid ? Hi , I facing a lot of problem for resizing the datagrid. I have created a datagrid component which I am placing in a HBox. I have to set the size of datagrid in percentage to make it resizable. Can anyone tell me what properties of datagrid can I set in percentage, I need to keep rowcount constant, that means rowheight will vary, now if I set pecentageHeight to some value say 90%, it calculates the rowheight and also the rowcount on it's own, so sometimes I get a extra empty row at the bottom and sometimes the last row appears half.
