For filtering a particular record :
1.First create a table i.e TableName with fields name , Ids(Base enum) , Phno , Age
2.Create a form and drag the table TableName into data source.
in design take a grid and a combo box give enum type as baseenum
3.In class:
public class FormRun extends ObjectRun
{
QueryBuildRange qbr2; // declartion of range variable
}
public class FormRun extends ObjectRun
{
QueryBuildRange qbr2; // declartion of range variable
}
4.In Data source level . Override a method init()
public int selectionChange()
{
int ret;
ret = super();
datasourcename_ds.executeQuery();
return ret;
}
- public void init()
{
super();
qbr2 = this.query().dataSourceName(“Datasourcename”).addRange(fieldNum(TableName, BaseEnum1));
}
public int selectionChange()
{
int ret;
ret = super();
datasourcename_ds.executeQuery();
return ret;
}
6.Create a range by overriding method executequery() in data source level:
public void executeQuery()
{
qbr2.value(comboboxName.valueStr());
super();
}
public void executeQuery()
{
qbr2.value(comboboxName.valueStr());
super();
}
Note
Set Auto Declaration :Yes for Combo box
Nice explanation
ReplyDelete