Reputation: 137
I want store the filters entered on the grid, is it possible to store the filters entered on filter pane of the grid.
I want to use those filters entered in my class, please help me in this regard.
Upvotes: 1
Views: 1420
Reputation: 11544
Yes you can retrieve the filters by getting the form's queryRun
's query
and packing that into a container to be stored/passed/unpacked.
The form has a query
, that is passed to QueryRun
, then the users puts filters/dynamic joins/etc on that query
that belongs to the QueryRun
. So you need the modified query
to store what you want from it.
void clicked()
{
Query q = salestable_ds.queryRun().query();
int i;
container c;
for (i = 1; i <= q.queryFilterCount(); i++)
{
info(strFmt("%1: %2", q.queryFilter(i).field(), q.queryFilter(i).value()));
}
// If we want to store these we can do
c = q.pack();
}
See this post http://dynamicsuser.net/forums/t/63208.aspx
Upvotes: 1
Reputation: 18051
No, form queries cannot be saved as code (but such functionality could be programmed).
A form query could be passed from the form to a class, using a parmQueryRun
method or similar.
See:
Upvotes: 2