|
As far as I recall, dropdown object can be
"dropped" and recreated when the data model and other things change. If you do
not reassign cellrenderer at that time it will be gone. It would make sense to
me to subclass the object and override getDropdown function to assign
cellrenderer on each call or at least when dropdown was not defined at the time
of the call.
Thank you,
Anatole
----- Original Message -----
Sent: Wednesday, February 22, 2006 4:00
AM
Subject: [flexcoders] Re: problem with
cell renderer in ComboBox
quite surprising this didn't work for you. i took this idea
from Peter Ent's weblogs. check out the cellrenders section
http://weblogs.macromedia.com/pent/archives/2004/12/index.cfm
the
code can be downloaded and there is a sample test app to see it in action.
its very good.
--- In [email protected],
"george_lui" <[EMAIL PROTECTED]> wrote: > > I don't see how
this was terribly different from the original code. > But I tried
it anyways and it doesn't work. > > thanx anyways, >
geo > > --- In [email protected], "bhaq1972"
<mbhaque@> wrote: > > > > why dont you simplify things
a bit. put your FullNameRenderer into > > the same folder
location as your ComboBox mxml application. > > > > and do
this > > <mx:ComboBox creationComplete="test(event)"> >
> > > function test(event){ > >
event.target.dropdown.cellRenderer = FullNameRenderer; > > } >
> > > > > > > > > --- In
[email protected], "george_lui" <george_lui@> > >
wrote: > > > > > > Y'know I just did a blind
copy&paste from some other guy in this > > > group. But
yeah, I don't see no getDropdown() method in the api > >
docs. > > > Just the dropdown property. I did try your
setting it to the > > > property and it still didn't work
:( > > > > > > thanx, > > >
george > > > > > > > > > --- In
[email protected], "Doug Lowder" <douglowder@> > >
wrote: > > > > > > > > Hi, > > >
> > > > > I'm not familiar with getDropdown(). Is
getDropdown() a valid > > method > > > > of your
combobox? > > > > > > > > If not, try
"event.target.dropdown.xxxx" instead of > > > >
"event.target.getDropdown().xxxx". > > > > > > >
> Doug > > > > > > > > > > >
> --- In [email protected], "george_lui" <george_lui@>
> > wrote: > > > > > > > > > >
Hi, > > > > > > > > > > I had a
cellrenderer that was originally used in datagrid > >
cell. I've > > > > > since replaced the datagrid with
a comboBox. I'm trying to > > reuse the > > > > >
same cellrenderer in the combo using the code below. > > > >
> > > > > > <mx:ComboBox
id="employeeComboBox"
> > > >
>
creationComplete= > > > > > > > > > >
> > "event.target.getDropdown > >
().cellRenderer='com.sf.sfv4.view.sharkfin.FullNameRenderer'; > >
> > > event.target.getDropdown().variableRowHeight=true" >
> rowCount="10"> > > > > >
<mx:dataProvider> { ModelLocator.employees } > >
</mx:dataProvider> > > > > >
</mx:ComboBox> > > > > > > > > > >
The FullNameRenderer cellrenderer I have just takes the first >
> and last > > > > > name of a user vo and concatenates
it. > > > > > > > > > > However this
isn't working for the combobox. I get and set the > > >
> > cellrenderer of the combobox's dropdown property as stated in
> > this > > > > > group by another member, but it
doesn't work. Instead I get > > the user > > >
> > vo object displayed. > > > > > > > >
> > I'm confused, I'm using the same dataProvider and cellrenderer
> > in the > > > > > combobox as I did in the
datagrid. I think there's a > > difference > > >
> > between the two widgets, but I just don't know what it is. >
> > > > > > > > > Please advise... > >
> > > > > > > > TIA, > > > > >
George > > > > > > > > > > >
> > > >
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- Re: [flexcoders] Re: problem with cell renderer in Com... Anatole Tartakovsky
-