Here the multiselect option is not working.when select a header record the corresponding line should visible.Please help to fix this.
Also, on the SelectionChanged method of SalesTable DataSource call SalesLine_ds.executeQuery()
Thanks,
Girish S.
Try the same code in the executeQuery method of the SalesLine DataSource before super class.
Thanks,
Girish S.
public int active() { int ret; MultiSelectionHelper helper = MultiselectionHelper::construct(); helper.parmDatasource(SalesTable_ds); SalesTable salesTableLocal; salesTableLocal = helper.getFirst(); while(salesTableLocal.RecId != 0) { QueryBuildRange qbr = SalesLine_ds.queryBuildDatasource().addRange(fieldnum(SalesLine, SalesId)); qbr.value(queryRangeConcat(qbr.value(),salesTableLocal.SalesId)); salesTableLocal = helper.getNext(); } ret = super(); return ret; }
sir i tried in this way but still it is not working...iam not getting all the lines for selected hedaers.......
You need to use mutiselect helper class to get the selected records and add its as range to the SalesLine table.
Add the below code in the active method of the SalesTable DataSource.
MutliselectHeper helper = MultiselectionHelper:;construct(); helper.parmDatasource(SalesTable_ds); SalesTable salesTable; salesTable = helper.getFirst(); while(salesTable.RecId != 0) { QueryBuildRange qbr = SalesLine_ds.queryBuildDatasource().addRange(fieldnum(SalesLine, SalesId)); qbr.value(queryRangeConcat(qbr.value(),salesTable.SalesId)); salesTable = helper.getNext(); }
Thanks,
Girish S.
I tried this.but still my requirement not satisfied.
I have a simple form with two DataSources, SalesTable and SalesLine, with SalesLine joined to SalesTable. There is a header and lines grid. The header grid has property MultiSelect = Yes
When I select 3 SalesTable records from the grid, is there a way to make it display all of the SalesLine records in the lower grid from the three selected SalesTable records in some native style?
Any one can share the code for this.
Hi Deepak, I think Multi select on header will not display all relevant lines automatically. You need to write code for it.
Please check this article
Hi Deepak,
If you have proper relation between tables, you will get filter automatically.
Otherwise add range on the line grid with the value from the header grid in the execute query method of line DataSource.
Also check whether you have set the join source property on the line DataSource to the header DataSource.
Thanks,
Girish S.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156