Apologies if this re-posts; first effort appears not to be showing up.
I'm trying to activate the cell BELOW the current one after user enters data
(i.e. user enters '33' and clicks <RETURN>; I'd like the cell immediately below the one with the 33 to become active for editing)
I've tried 'focus on' after retrieving the names of the fields in the dataGrid, but this seems to be disallowed
Is there a dg command or simple trick I should be thinking of?
Thanks!
Bruce
Spreadsheet-like behavior of dataGrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Spreadsheet-like behavior of dataGrid
Hi.
There might be several ways to do this, but check out the "closeFieldEditor" message in the datagrid docs.
If you put this into the group script:
You will see that the field just edited appears in the message box when you change any data and hit return. You can use this to select the field below. You might see:
field "Col 2 0002"
And then you can select field "Col 2 0003"
Craig Newman
There might be several ways to do this, but check out the "closeFieldEditor" message in the datagrid docs.
If you put this into the group script:
Code: Select all
on closeFieldEditor
put the target
end closeFieldEditor
field "Col 2 0002"
And then you can select field "Col 2 0003"
Craig Newman
Re: Spreadsheet-like behavior of dataGrid
Thanks!
I'll give it a whirl.
I'll give it a whirl.
Re: Spreadsheet-like behavior of dataGrid
A better way to do this, since scrolling a datagrid may not return the correct line number when using "the target", is to:
You can now know which row of which column was just edited, and navigate accordingly.
Craig Newman
Code: Select all
on closeFieldEditor
put the dghilitedLines of me && word 2 of the dgColumn of the target
end closeFieldEditor
Craig Newman