Hi Matt, If the datagrid is in Accordian and still hidden, the rowcount property is not working somehow. If the results change when the datagrid is visible, it works. Any clue?
Regards... --- In [email protected], Matt Chotin <[EMAIL PROTECTED]> wrote: > http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/listclas ses/Scr > ollSelectList.html#rowCount > <http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/listcla sses/Sc > rollSelectList.html#rowCount> :-) > > > > _____ > > From: Robert Brueckmann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 01, 2005 9:44 AM > To: [email protected] > Subject: [flexcoders] datagrid height > > > > Hey guys...I am trying something and getting a strange behavior. I get an > array of objects from the database that becomes the data provider for my > datagrid. I know the length of my data provider thanks to the > myDataGrid.dataProvider.length method and I figure I could multiply that > number by some arbitrary number of pixels to ensure that however many items > are in my data provider, that's how many rows are visible in my datagrid on > the screen...so the datagrid is never scrollable. > > > > I'm using a method that sets the dataprovider of the datagrid, > myDataGrid.dataProvider = data; and then I'm calling > myDataGrid.setSize(Stage.width - 35, myDataGrid.dataProvider.length * 25); > > > > The Stage.width - 35 compensates for some other things on the screen to look > proportionate and the myDataGrid.dataProvider.length * 25 is just > guesstimating that each row in the datagrid component is about 25 pixels > high. Well the first time I tried this, 25 was too large of a number so I > adjusted it to 22, which seemed to work but still left me with a little > extra bit of a final row visible. Well that was livable. Then I get a > result set back that only had 2 items in it, instead of the 5 I had been > testing this whole thing with and now only one row was visble and you have > to scroll down to see the second row, so I increased the 22 to 30 and that > fixed it for that but now if I call the original result set with the 5 > items, I can see a row and a half extra blank rows. Is there a better way > to dynamically show the number of rows based on the number of items in the > data provider? I wish there was a size attribute like there is with the > HTML select list component where if it's a list you can say I want x-number > of rows visible. I just don't ever want the user to have to scroll within > the datagrid...is there an easier way to do this? > > > > Thanks! > > > > _____ > > This message contains information from Merlin Securities, LLC, or from one > of its affiliates, that may be confidential and privileged. If you are not > an intended recipient, please refrain from any disclosure, copying, > distribution or use of this information and note that such actions are > prohibited. If you have received this transmission in error, please notify > the sender immediately by telephone or by replying to this transmission. > > > > Merlin Securities, LLC is a registered broker-dealer. Services offered > through Merlin Securities, LLC are not insured by the FDIC or any other > Federal Government Agency, are not deposits of or guaranteed by Merlin > Securities, LLC and may lose value. Nothing in this communication shall > constitute a solicitation or recommendation to buy or sell a particular > security. > > > > > > > Yahoo! Groups Sponsor > > > > ADVERTISEMENT > > <http://us.ard.yahoo.com/SIG=129qdkk5d/M=298184.6018725.7038619.30011 76/D=gr > oups/S=1705007207:HM/EXP=1109774669/A=2593423/R=0/SIG=11el9gslf/*http :/www.n > etflix.com/Default?mqso=60190075> click here > > > > <http://us.adserver.yahoo.com/l? M=298184.6018725.7038619.3001176/D=groups/S= > :HM/A=2593423/rand=756983836> > > > > _____ > > Yahoo! Groups Links > > * To visit your group on the web, go to: > http://groups.yahoo.com/group/flexcoders/ > <http://groups.yahoo.com/group/flexcoders/> > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! > <http://docs.yahoo.com/info/terms/> Terms of Service. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

