Constrain a datagrid to currentDatetime token

8
I would like to constrain a datagrid to the currentDateTime token. Now I believe I can do this in two ways: Add an Xpath in the datagrid with: Date = CurrentDateTime Add an search field. Fill this search field with a default value: CurrentDateTime and set the search field to hidden. What should be an argument to use one way instead of the other way?
asked
2 answers
12

The user won't experience any difference between the Xpath or default search value set to hidden. Only if you set the search field with a default value to normal, a user will be able to change the filter of the datagrid. If you set the search field to 'read only', the user is aware of the filter on the datagrid.

I prefer to set a Xpath constraint on the datagrid.

answered
5

The most common way used is setting a Xpath constraint on the datagrid. I've never heard someone before about the other way you described. But I do believe that it works. Technically it doesn't matter because in both ways the datagrid uses Xpath to constraint the set of data. But why would you place an useless search field in your data grid if the data grid has support built-in for your case...

answered