SmartClient Version: v10.0p_2014-09-30/LGPL Development Only (built 2014-09-30)
I have a filter on a grid that has a criteria that is based upon "now". Since "now" is always changing, the filtered in/out state of a given record can change from one moment to the next.
I've tried using a technique of loading all of my data from the server using REST and using it to create a client-only data source and attaching it to the grid. I then set up a timer that tries to refresh the filter on the grid every 15 seconds.
I am doing the following to refresh the filter:
I have a small sample that I developed that does this, and it works fine. However when I do it in my actual application I lose my selection in the grid if I execute the line above.
My application has a lot of complexity in setting up my grid (because it is used generically in my app for lots of other grids, the field information is all data driven from my server and goes through complex routines to build the data source and list grid field objects that are used, set field state, set highlighting, etc.)
So, I cannot figure out what the difference is in my small sample and my more complex application that causes the difference in behavior (one case maintains selection, the other loses it).
I want to be able to either figure out what I am doing differently in the two cases that is affecting this behavior, or send you a small sample, but I can't seem to narrow it down to something smaller than full app (and there is no practical way to send that to you).
Can you provide any guidance that might help narrow down the difference?
I have a filter on a grid that has a criteria that is based upon "now". Since "now" is always changing, the filtered in/out state of a given record can change from one moment to the next.
I've tried using a technique of loading all of my data from the server using REST and using it to create a client-only data source and attaching it to the grid. I then set up a timer that tries to refresh the filter on the grid every 15 seconds.
I am doing the following to refresh the filter:
Code:
grid.setCriteria(grid.getCriteria());
My application has a lot of complexity in setting up my grid (because it is used generically in my app for lots of other grids, the field information is all data driven from my server and goes through complex routines to build the data source and list grid field objects that are used, set field state, set highlighting, etc.)
So, I cannot figure out what the difference is in my small sample and my more complex application that causes the difference in behavior (one case maintains selection, the other loses it).
I want to be able to either figure out what I am doing differently in the two cases that is affecting this behavior, or send you a small sample, but I can't seem to narrow it down to something smaller than full app (and there is no practical way to send that to you).
Can you provide any guidance that might help narrow down the difference?