Refresh DataGrid with new info
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 48
- Joined: Sat May 24, 2008 2:27 pm
- Location: Indiana, USA
Refresh DataGrid with new info
I have a DataGrid that gets populated by a few commands in openCard. When a user clicks an entry the mouseUp handler runs. Near the end of the mouseUp I need to refresh the data (which most likely changed from the openCard) and have the DataGrid show the latest data. All of my attempts to 'set the dgdata...' from within the mouseUp have failed to refresh the template/data of the DataGrid. Does anyone have any words of wisdom or can point me in the right direction ?
-
- VIP Livecode Opensource Backer
- Posts: 48
- Joined: Sat May 24, 2008 2:27 pm
- Location: Indiana, USA
Re: Refresh DataGrid with new info
Doesn't seem to do anything. Imagine a DataGrid with a row template having a label. The first row label has content of 1. The second 2 - and so on. As soon as you mouseDown on a row the contents of each row in the DataGrid would be multiplied by the content of the field you clicked on. This could repeat as many times as you want. When you click on the second row, how can the mouseDown change the contents of the other rows. Does that make sense ?
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Refresh DataGrid with new info
Oh.
I do all my data stuff in the clear. That is, I extract the entirety of the DG contents either with the "dgData" or the "dgText", crunch whatever I need to, and then restore.
Sounds cumbersome, but straightforward.
It is certainly possible to deal with the DG directly, setting the contents by row or index, but I am lazy that way.
Craig
I do all my data stuff in the clear. That is, I extract the entirety of the DG contents either with the "dgData" or the "dgText", crunch whatever I need to, and then restore.
Sounds cumbersome, but straightforward.
It is certainly possible to deal with the DG directly, setting the contents by row or index, but I am lazy that way.
Craig