[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

How to filter datagrid data by selection of combobox

jxiang

10/4/2005 5:11:00 PM

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.
4 Answers

Efraín

10/4/2005 5:20:00 PM

0

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.

jxiang

10/4/2005 8:43:00 PM

0

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.

Efraín

10/5/2005 4:49:00 PM

0

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.

Internet Explorer User Gets Runtime Erro

6/19/2007 4:07:00 AM

0

My apology for repeated posts. These newsgroups have always been an enormous
asset. I got frustrated. Uninstalling and reinstalling the IIS components in
add remove programs worked and the IIS components appeared. Thanks

"Internet Explorer User Gets Runtime Erro" wrote:

> Thank you. I'm immersed in a nightmare.
>
> NO IIS is NOT RUNNING. :-(
>
> There is NO IIS manager (in Administrative Tools)
>
> I have installed the windows components three times from Add/Remove Windows
> Components. When I go in there IIS is checked for the 18 mb it comprises.
> I've been downloading updates for Front Page and W2k pro it seems for a week.
>
> Any other suggestions. Please help. there is a wwwroot directory in
> INETPUB but nothing in programs about IIS
>
> Help please
>
>
>
>
>
>
> "Daniel Crichton" wrote:
>
> > Internet wrote on Sat, 16 Jun 2007 18:41:00 -0700:
> >
> > > I'm an amateur at server admin. I used add/remove pgrms in w2k to add iis
> > > components and used front page to create an index file. I have it sitting
> > > in
> > > wwwroot directory I see no IIS app in programs to publish the page. How
> > > do I do it?
> > >
> > > also http://localhost/iisHelp/ returns "page cannot be displayed" How
> > > can
> > > I get this help page?
> > >
> >
> > Is IIS running? Start up IIS manager (in Administrative Tools) and check all
> > the settings are correct.
> >
> > Dan
> >
> >
> >