Efraín
10/5/2005 4:49:00 PM
Well, the method belongs to the combobox through the value obtained in
"this.selection()" you are goin to filter some data field in the grid, the
field in the grid is "AdAsigContra_TipoContrato", this is the file to be
replaced in your code.
"jxiang" wrote:
> Hi Efrain,
>
> I tried the code. The problem is that I couldn''t figure out what
> "AdAsigContra_TipoContrato" stand for in your code.
> Also there is no filter property for field so I don''t know where I
> can set the filter to Yes. I just know a little about Axapta.
> Could yo give me more details?
>
> Thanks you very much.
>
> "Efraín" wrote:
>
> > You can try something like this in the selectioChange Method of the combobox:
> >
> > public int selectionChange()
> > {
> > int ret;
> >
> > ret = super();
> >
> > Box::info(int2str(this.selection()));
> >
> > if (this.selection()==0)
> > {
> > AdAsigContra_TipoContrato.filter("");
> > }
> > else
> > {
> > AdAsigContra_TipoContrato.filter(int2str(this.selection()));
> > }
> >
> > return ret;
> > }
> >
> > before this, you need to put the autodeclaration propertie of the field to
> > filoter to Yes
> >
> > "jxiang" wrote:
> >
> > > I put a datagrid and a combobox on one form. the datagride shows data from a
> > > table named Assets. There is a District field in the table. I added items to
> > > the combobox as the possible values for the District field. Now I want to
> > > select a item from the combobox and then filter the data on the datagrid by
> > > the selection. How to set the filter with the selection? Please help. Very
> > > Appreciated.