I have a simple Form, in my DataSource I created a classic displayMethod (named calculateAmount) and use this metodod to show the value in Form's grid.
So It's possible to show only record having a specific value from calculateAmount , for example I want to show only record having calculateAmount() > 0 , other record with calculated calculateAmount() < 0 not show.
So if I can't mix Query and displayMethod, possibly where I can insert the condition (for example active executeQuery etc) ?
Thanks in advice.
Consider the following sequence:
executeQuery()
So you cannot add query range on execute query
based on display method value.
One thing you can do:
executeQuery
method write the logic to fill this new created tableHere you can add this condition like this:
if ([your data source].calculateAmount() > 0)
{
// do not add the record in temp table
}
else
{
// add the record in temp table
}
Set your temp table as the datasource to your grid.
Hope this helps!!