Passing DataGrid Row Number to card
Posted: Thu May 23, 2013 4:39 pm
Hi,
This is my first exposure to LiveCode and so far I'm loving it.
I've managed to do the leg-work with my app, bring in data from a webservice, convert JSON to an LC array and map it to a DataGrid just fine - much easier than expected. What I now need to do is to be able to click on a row in my DataGrid and pass the row number on to a new card - where it can be used as an array reference to retrieve the correct values for the chosen record (row) in the previous card's DataGrid.
All the reading I've done explains how to do really impressive things with the DataGrids but not the very simple thing that I'm trying to achieve. I've even understood how to send variables as messages between cards, but not on how to extract the DataGrid's row number when clicked and pass that as the variable. Can anyone give me a tip or link to an article showing what to do?
Many thanks,
Steve
This is my first exposure to LiveCode and so far I'm loving it.
I've managed to do the leg-work with my app, bring in data from a webservice, convert JSON to an LC array and map it to a DataGrid just fine - much easier than expected. What I now need to do is to be able to click on a row in my DataGrid and pass the row number on to a new card - where it can be used as an array reference to retrieve the correct values for the chosen record (row) in the previous card's DataGrid.
All the reading I've done explains how to do really impressive things with the DataGrids but not the very simple thing that I'm trying to achieve. I've even understood how to send variables as messages between cards, but not on how to extract the DataGrid's row number when clicked and pass that as the variable. Can anyone give me a tip or link to an article showing what to do?
Many thanks,
Steve