@ravi
i think creationComplete event is associated with flex_event i m not
getting how to call it for datagrid
plz tell

thanx and rgds
akhil

On Apr 22, 5:32 pm, Ravi Mishra <[email protected]> wrote:
> Call it on the creationComplete event of your datagrid.
>
> HTH,
>
> -Ravi
>
> On Apr 22, 5:29 pm, Akhil Agrawal <[email protected]> wrote:
>
> > @virat
> > thanks for ur rply. but problem is that it gives rowheight after
> > completion of flex application while i want this infomation just after
> > grid is greated how can i do this??
>
> > thanx and rgds
> > akhil agrawal
>
> > On Apr 22, 11:52 am, "v...@t" <[email protected]> wrote:
>
> > > Hello
>
> > > I have done some work as per your problem, may it helps you..
>
> > > In this you ll get each row height of DataGrid so you can use it.
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > > layout="vertical"
> > >                 horizontalAlign="center" verticalAlign="middle"
> > > creationComplete="onCreationComplete(event)">
>
> > >         <mx:Script>
> > >                 <![CDATA[
> > >                         import mx.managers.SystemManager;
> > >                         import mx.events.FlexEvent;
> > >                         import mx.collections.ArrayCollection;
> > >                         import mx.controls.listClasses.*;
>
> > >                         [Bindable]      private var arrData : 
> > > ArrayCollection = new
> > > ArrayCollection
> > >                         ([
> > >                                 
> > > {name:"abcdefghijklmnopqrstuvwxyz1234567890",call:"4444"},
> > > {name:"hello1234",call:"5555"},
>
> > > {name:"abcdefghijklmnopqrstuvwxyz09876543211234567890abcdefghijklmnopqrstuvwxyz09876543211234567890",call:"1111"},
> > > {name:"call12345",call:"2222"}
> > >                         ]);
>
> > >                         private function 
> > > onCreationComplete(event:FlexEvent):void
> > >                         {
> > >                                 for(var i:int; i<dg.numChildren; i++)
> > >                                 {
> > >                                         var disObj:Object =  
> > > dg.getChildAt(i);
> > >                                         if ( disObj is 
> > > mx.controls.listClasses.ListBaseContentHolder )
> > >                                         {
> > >                                                 var holder : 
> > > ListBaseContentHolder = disObj as
> > > ListBaseContentHolder;
> > >                                                 for(var j:int=0; 
> > > j<holder.rowInfo.length; j++)
> > >                                                 {
> > >                                                         trace ( ( 
> > > holder.rowInfo[j] as ListRowInfo ).height );
> > >                                                         // wher u get 
> > > height each row
> > >                                                 }
> > >                                         }
> > >                                 }
> > >                         }
> > >                 ]]>
> > >         </mx:Script>
>
> > >         <mx:DataGrid id="dg" width="400" variableRowHeight="true"
> > > wordWrap="true"
> > >                         dataProvider="{arrData}"  >
> > >                 <mx:columns>
> > >                         <mx:DataGridColumn dataField="name" 
> > > headerText="Name" />
> > >                         <mx:DataGridColumn dataField="cell" 
> > > headerText="Phone" />
> > >                 </mx:columns>
> > >         </mx:DataGrid>
>
> > > </mx:Application>
>
> > > Thanks
> > > Virat Patel
>
> > > On Apr 22, 9:28 am, Akhil Agrawal <[email protected]> wrote:
>
> > > > grid height is fixed bt no. of rows may vary according to data if data
> > > > in a row is large grid may contain less no. of rows else greater ie.
> > > > rowcount should depend on data displayed in grid at run time how it is
> > > > possible
>
> > > > On Apr 21, 7:48 pm, Jagadish M <[email protected]> wrote:
>
> > > > > Hi Akhil,
>
> > > > >   According to your mail, I mean that you don't want to display any
> > > > > scrollbars, the grid height should be increased as the data 
> > > > > increased..
> > > > > for that you hav to use a small property *rowCount="{ac.length}" *
>
> > > > > Here the ac is arraycollection
> > > > > for ex:
> > > > > <mx:DataGrid id="dg" dataProvider="{ac}" click="cli()" 
> > > > > rowCount="{ac.length}"
> > > > > />
>
> > > > > On Tue, Apr 21, 2009 at 6:24 PM, Akhil Agrawal 
> > > > > <[email protected]>wrote:
>
> > > > > > hi all,
> > > > > > i am creating datagrid at runtime by providing data. problem is that
> > > > > > grid height is fixed but data may be of variable length so how can i
> > > > > > decide the no. of rows in a grid at run time ie.  how can i find the
> > > > > > max row height in the grid
>
> > > > > > thanxs
>
> > > > > --
> > > > > Thanks & Regards,
>
> > > > > Jagan Mady's
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to