SmartGWt Version 4.1-p20140627 Eval
I have a TreeGrid that I initially populate from a database using Criteria that I pass to fetchData(). My nodes have a parentID field defined in the data source. I am using the SQL data source.
My initial call to fetchData returns the top level nodes, based on the Criteria. When I expand a folder, though, I see that the generated SQL query includes not only the parentID requirement, but also the original Criteria. What I am looking for is a way to have the folder expansion just use (parentId = value) in the WHERE clause, without the original Criteria clauses.
What happens now:
Initial query is: SELECT fields FROM table WHERE (username = 'rush')
Folder open query is: SELECT fields FROM table WHERE (username = 'rush') AND (parentId = 12345)
What I would like is for the folder open query to be: SELECT fields FROM table WHERE (parentId = 12345)
Can this be done?
I have a TreeGrid that I initially populate from a database using Criteria that I pass to fetchData(). My nodes have a parentID field defined in the data source. I am using the SQL data source.
My initial call to fetchData returns the top level nodes, based on the Criteria. When I expand a folder, though, I see that the generated SQL query includes not only the parentID requirement, but also the original Criteria. What I am looking for is a way to have the folder expansion just use (parentId = value) in the WHERE clause, without the original Criteria clauses.
What happens now:
Initial query is: SELECT fields FROM table WHERE (username = 'rush')
Folder open query is: SELECT fields FROM table WHERE (username = 'rush') AND (parentId = 12345)
What I would like is for the folder open query to be: SELECT fields FROM table WHERE (parentId = 12345)
Can this be done?