Announcements
No record found.
Hi Guys;
I have a String Edit and I want to re filter grid by selecting item of String Edit.
*This post is locked for comments
I assume the grid is bound to a dataource.
You could use an event method (modified?) on the string edit control to call executeQuery on that datasource. In executeQuery, before the call to super(),
depending on the circumstance, clear all ranges on the datasource and create a new range for the appropriate field clear the range on the appropriate field of the datasource grab the value of the string edit control and use it as the argument for the value() method of the range
Hi Rick,
Can you explain me your scenario completement?
This is Answer:
public void lookup() { QueryBuildDataSource qbds; Query query = new Query(); SysTableLookup sysTableLookup; super(); sysTableLookup = SysTableLookup::newParameters(tableNum(Table1),this); qbds = query.addDataSource(tableNum(Table1)); sysTableLookup.addLookupfield(fieldNum(Table1, RelatedId)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); }
2.Expand the StringEdit, right-click Methods, click Override methods, and then click modified.
public boolean modified() { boolean ret; ret = super(); Table1_ds.executeQuery(); return ret; }
3. Expand the Methods node of the form, right-click classDeclaration,
public class FormRun extends ObjectRun { QueryFilter queryFilter; }
4. Expand the Data Sources node, and then find the table that has the field that has the values that you will use to filter the list.
5. Expand the table node, right-click Methods, click Override method, and then click init.
public void init() { super(); queryFilter = Table1_ds.query().addQueryFilter(Table1_ds.queryBuildDataSource(),"relatedID"); }
6.In the same table, right-click the Methods, click Override method, and then click executeQuery.
public void executeQuery() { queryFilter.value(element.design().controlName("StringEdit").valueStr()); super(); }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Alexey Lekanov 2
Henrik Nordlöf 2 User Group Leader