Hi all
I have a delete button in the row template group of a data grid form.
When the user touches there delete button I do this:
deleteRecord the dgIndex of me
...and I handle that command in the card script with:
on deleteRecord whichRow
dispatch "deleteline" to group "datagrid" with whichRow
end deleteRecord
That deletes the specified row, but something isn't working right. For example,
if the delete button in row 4 is touched, the fourth row in the data grid is
deleted which moves the 5th row into the 4th row position. But I then touch the
delete button in the (new) 4th row, the dgIndex passed to my delete script
isn't 4...it's 5.
Why is that, and how do I fix it? In the past when I've done a row delete in a
data grid form I've simply deleted the record in my database, rebuilt the data
grid array and re-populated the data grid. So how do I do a row delete without
having to do that?
Cheers
Gerry
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode