Hello all!
In the datagrid user guide PDF and the Lessons, it's noted that you should not attempt to refresh the grid from a control inside the grid. If my understanding is correct, this is because Rev is trying to delete the very control that is calling the refresh. Yes?
Ok, so... how does one get around this? In the solution I'm building, I absolutely have to be able to refresh the grid when the contents of a line change, when a new line is inserted or one is deleted.
A basic description of my grid is this:
it is an SQL-stored, datagrid-viewed event log of user-entered events on a given day (the user navigates which day to display elsewhere on the main stack). All lines have a timestamp field and various other fields about the event entry. Each line also displays the time interval between itself and the previous line. In the case of the first line, the interval is between that line and the last line of the previous day. This calculation is done by SQL and not by Rev. This interval calculation is "mission-critical" and thus MUST be accurate at all times. Each line contains a "deleteLine" button, may contain one of a variety of "postThisEdit" controls, but adding a record is handled outside the grid, and I can handle updating the grid for that process.
So, in the cases of deleteing or changing a line, the thread at:
http://forums.runrev.com/phpBB2/viewtopic.php?t=3056 might contain the answer but I wanted to be sure that was the right way to go before I go implementing anything.
Your help greatly appreciated...
Datagrid refresh
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
The thread you reference has solutions you can use. If you are refreshing the data grid from a row behavior then you must use send in time.
If, however, you are processing all engine events in the data grid script then you don't have to worry since the data grid won't be deleted. I've updated the lesson that discusses this with two examples.
http://revolution.screenstepslive.com/s ... Suffering-
If, however, you are processing all engine events in the data grid script then you don't have to worry since the data grid won't be deleted. I've updated the lesson that discusses this with two examples.
http://revolution.screenstepslive.com/s ... Suffering-
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Many thanks
Thanks a ton, Trevor!
When I finish this solution and start selling it to the public, you'll be happy to know it will contain documentation made with my favorite documenting tool, your wonderful ScreenSteps.
When I finish this solution and start selling it to the public, you'll be happy to know it will contain documentation made with my favorite documenting tool, your wonderful ScreenSteps.
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact: