简体   繁体   中英

Dynamics Ax How to Add Filter to Grid

I have a form/grid that contain 2 different datasource

I added StringEdit To form StringEdit's EDT is a field From datasource1

I want to add filter to Datasource2 records according to Stringedit

there is relations between tables

select datasource1 Join datasource2 where datasource2.ImpExtraCostInv == datasource1.ImpExtraCostInv && datasource2.ImpDocNum == CostParameter.valueStr()";

qbrType.value(queryValue(datasource1.valuestr())));

Why not working

They can be several things.

Did you establish a relationship between datasources in datasource properties?

在此处输入图像描述

You can also do it by code by overwriting init or executeQuery method (depending on what you need is better init method) Did you do it?

You will need a code similar to this to filter the datasource:

this.query().dataSourceTable(tableNum("datasource2")).addRange(fieldNum(datasource2,ImpExtraCostInv)).value(queryValue(datasource1.ImpExtraCostInv));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM