I copied and pasted the example from the forum and put it on a button script but it doesn't delete the row. It's just kind of hilite the text on the row. What am I missing here? Please help.
on mouseUp
local tLine, tCutRow
put the dgindex of group "DataGrid 1" into tLine
put "deleteindex " & tLine into tCutRow
send tCutRow to group "DataGrid 1"
end mouseUp
To delete a row in a datagrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Re: To delete a row in a datagrid
If you use the debugger (or answer dialog/put statement) I think you will find that tLine doesn't have a number in it. dgIndex is not a property of a data grid, but rather of a row in the data grid. Try putting the dgHilitedIndex of group "DataGrid 1" into tLine and see if that works.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Re: To delete a row in a datagrid
You're welcome.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder