Scenario:-
Create two tables.Create one query in AOT. Add that Tables into Query as a Datasource. The Second table should be added as a childdatasource. After add that Query as Datasource for a new Form. Now add one StringEditcontrol in the form. If open the form the control should enable lookup all the records from both tables in Query. And If multiple records are selected all that records should display in the control.
We have to follow some steps....
Step 1:
Create two tables (ParentTable,Child).
Step 2:
Create a Query(ParentTableChild) in AOT and Add the table(ParentTable) as a Datasource into the Query. The Second table(Child) should be added as a childdatasource.
Step 3:
Create new form and drag and drop the query(ParentTableChild) into form.
Step 4:
Create a StringEdit Control(LookUpField) under Design node.
Step 5:
Now, to enable multiselectlookup in the control we need to use a System class(SysLookupMultiSelectCtrl).
Step 6:
we need to write code under init() method....
ClassDeclaration:-
public class FormRun extends objectRun
{
SysLookupMultiSelectCtrl msCtrl;
}
Public void init()
{
super();
msCtrl=SysLookupMultiSelectCtrl ::construct(element,LookUpField,querystr(ParentTableChild));
}
No comments:
Post a Comment