Yup, next up, a custom IFactory to determine the columns and whatnot

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of reflexactions
Sent: Tuesday, December 04, 2007 9:25 PM
To: [email protected]
Subject: [flexcomponents] Re: ComboBox with a dropdown DataGrid

 

Simplisticly this does it 
package my.controls{
import mx.controls.ComboBox;
import mx.controls.DataGrid;
import mx.core.ClassFactory;

public class DropDownDataGrid extends ComboBox{
public function DropDownDataGrid (){
dropdownFactory=new ClassFactory(DataGrid);
}
override public function get rowCount():int{
return super.rowCount+1;
} 

}}

need the +1 on the row count to allow for the header row..

--- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> , "reflexactions" 
<[EMAIL PROTECTED]> wrote:
>
> Thanks Alex good to know, 
> Actually thinking about it at least for the simple case you are 
> right, I saw I could set the factory property but then discounted 
> that as there didnt seem to be anyway to configure the dropDown 
once 
> the instance is created becuase getDropDown is private. However at 
> least for a simple grid it can be built directly from the 
> DataProvider without any extra configuration
> I sort of feel however that this probably wont be enough because I 
> know that in this application/system the grids generally have a lot 
> of custom formats, so I am gussing that there would need to be away 
> to specify the grid structure.
> 
> 
> --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> , "Alex Harui" <aharui@> 
> wrote:
> >
> > All you should need to do is change dropdownFactory. I wouldn't 
> have
> > said I did it if I had to monkey-patch anything.
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> > [mailto:[email protected]
<mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of reflexactions
> > Sent: Tuesday, December 04, 2007 8:58 PM
> > To: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> > Subject: [flexcomponents] Re: ComboBox with a dropdown DataGrid
> > 
> > 
> > 
> > Hmm well..
> > 
> > Basically as Shannon says... 
> > They want more than just a fancy label format can handle, plus.. 
> > plus...
> > Also to some extent "mines not to reason why", I just build it..
> > 
> > Actually it doesnt seem that difficult to do barring the usual 
> issue 
> > in extending Adobe components that just about every property you 
> need 
> > to access has been declared private.
> > CombBox by and large deals in ListBase and Grid derives from 
> > ListBase, just _dropdown and getDropdown are private so I will go 
> the 
> > AbjectOrientated approach and cut and paste ComboBox into a new 
> class 
> > and then modify those bits.
> > Probably will make the dropDown a public property so the grid 
> > definition can be nested in combo tag or allow it to be built 
> > externally and then set.
> > Anyway those are just my thoughts of the top of my head...
> > 
> > 
> > --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> > <mailto:flexcomponents%40yahoogroups.com> , "ben.clinkinbeard" 
> > <ben.clinkinbeard@> wrote:
> > >
> > > Not that I know of but I have to ask- why would you want to do 
> that?
> > > 
> > > 
> > > --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> > <mailto:flexcomponents%40yahoogroups.com> , "reflexactions"
> > > <reflexactions@> wrote:
> > > >
> > > > Before I reinvent the wheel has anyone tried this?
> > > > 
> > > > tks...
> > > >
> > >
> >
>

 

Reply via email to