Code: Select all
on mouseUp
put the selectedText into theDataA[1]["LastName"]
lock screen
set the dgData of group "DataGrid 1" to theDataA
unlock screen
end mouseUp
The problem is that theDataA[1]["LastName"] is an array. You are assigning a value to the first entry of an array, into a subarray named "LastName".
So far so good. Then you set the data of the grid you made to that array. Also so far so good. The first time.
The second time you do it, you are still placing your data into the FIRST entry of your array, then again assigning the whole array (with only 1 entry) to the datagrid, so all it would do is change the value for the first line over and over and over.
To do what you actually want, check out this page.
http://revolution.screenstepslive.com/s ... Data-Grid-
Technically you could keep adding lines to your grid similar to the way you were trying if you incremented the number in [#] each time but then every single time ALL the data in the grid must be reloaded, so its not the best way to do this. Go to the link above, it is the proper way to accomplish what you're trying to do.