I am trying to use a datagrid form for the first time to display some data held in a TSV file. I am at the stage where I would like to be able to edit the data held in certain "fields" and have found a tutorial named "How can the user edit field content in a Data Grid Form?".
The tutorial calls for a new handler to be added to "## Placed in script of row template behavior" which I take to mean the script that is opened when the button "Row Behavior..." is pressed in the object inspector.
Two versions of a mousedown handler are listed, the first extracts the dgHilitedLine the second the dgHilitedIndex. for purposes of experimentation and testing I have merged these two examples in to this handler which is in the Row Behavior:
Code: Select all
On mouseDown pBtnNum
if pBtnNum is 1 then
if the short name of the target is "Title" then
put "Title" into theKey
put the dgHilitedIndex of me into theIndex
put the dgHilitedLine of me into theLineNo
answer "Mouse up fires, the index is : " & theIndex & " The Line number is : " & theLineNo
-- EditKey thekey, theLineNo
-- EditKeyOfIndex theKey, theIndex
end if
end if
end mouseDown
best wishes
Simon K