Page 1 of 1

DeleteLine from a DG Form

Posted: Tue Aug 11, 2015 3:29 am
by quailcreek
I know this has been discussed on a few threads but I didn't find a solution. My code is in the behavior script of a datagrid form. The user can swipe left to reveal a delete image/button. When they tap the delete image they are presented with the option of deleting or not. There is additional code which deletes the row data from the SQLite Db.

All this code is supposed to do is remove the row from the DG. What am I doing wrong.

Code: Select all

put the dgHilitedLines of me into tLineNum
         lock screen
         dispatch "deleteLine" to me with tLineNum
         dispatch "refreshList" to me
         unlock screen
Thanks a lot.

Re: DeleteLine from a DG Form

Posted: Tue Aug 11, 2015 4:06 am
by quailcreek
Ok, I found my error.

put the dgLine of me into tLineNum
not
put the dgHilitedLines of me into tLineNum