How to put the dgHilitedLines property into theDataA array

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

How to put the dgHilitedLines property into theDataA array

Post by jesse » Thu Jun 02, 2011 7:29 am

I have a Datagrid that I am working on coding an update function. When the user double clicks the record a
new window opens allowing them to edit the record. Once the record has been updated I want to refresh
only the record that was edited and not the whole datagrid.

I thought I would do this by adding the dgHilitedLines property (the index number of the row selected)
to the DataA so I could then just have some code like below. But my problem is I am unsure how to get
theLine into theDataA array.

Code: Select all

        put "New Product Name" into theDataB["Name"]
        put "New ID" into theDataB["ID"]
        set the dgDataOfIndex[ the theLine of group "myGrid" ] of group "myGrid" to theDataB

Currently my code for setting the theDataA array looks like this.

Code: Select all

        put the dgHilitedLines of group "myGrid" into theLine
        put the dgDataOfLine[theLine] of group "myGrid" into theDataA
Anyone have any idea? :)
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Post Reply