How can I check the TextMatchStyle used to create the current result set of a ListGrid?
When setting the filter, TextMatchStyle was set as an argument of the DSRequest.
Is it stored and accessible somewhere in the ListGrid, like Criteria is stored and accessoble as getCriteria?
Since this data is needed to recreate the state of the grid, I hope it is available somehow.
There’s not currently an accessor. Since you supply the setting and the end user can’t change it via the built-in UI, you can simply track the setting yourself.
I might be wrong, but it seems to me that when the users starts a search using the built-in filter row, text match style will be set to substring. (This is kind of my use case here: I am trying to detect whether the user has changed the setting, but I can only read the criteria, which theoretically can be the same as the one i’ve set, but still give different results, because using substring instead of exact matching.)
We would definitely not recommend applying criteria to the grid that show up in the FilterEditor but are done using an operator that differs from whatever you have configured for the FilterEditor (or the particular fields in question). That’s very confusing.
OK, the solution seems to be to forget the global TextMatchStyle setting, and set this on the field level instead, anticipating the user searches. This way the user never changes this, and we can keep track of it.
(For the record: about setting TextMatchStyle on the field level, see here: http://forums.smartclient.com/showthread.php?t=10171)