>Hi all,
>
>I need to know if there is a way to design a grid so that a user can select multiple rows in a grid by using a hot key and the down or up arrow? Or, something to this effect.
>
>Thank You
To "select" multiple rows in a grid, you need an additional field in the underlying table that denotes whether the current record is selected.
You can create the visual effect of record selection by setting your grid column's DynamicBackColor properties to something like:
IIF(MyTable.Selected,RGB(255,0,0),RGB(255,255,255))
To enable the user to toggle the selection status with hotkeys, you'll have to write code in the Keypress events of the textboxes in the grid to watch for the selected keys, and take the appropriate action. You could try something like:
DO CASE
CASE nKeyCode = 24 AND ShiftAltCtrl = 1
NODEFAULT
lSelected = Mytable.Selected
SKIP
REPLACE Mytable.Selected WITH lSelected
CASE nKeyCode = 5 AND ShiftAltCtrl = 1
NODEFAULT
lSelected = Mytable.Selected
SKIP -1
REPLACE Mytable.Selected WITH lSelected
ENDCASE
Erik Moore
Clientelligence