Hi!
There is DoScroll method in grid. Just check, if user press up arrow and RelativeRow=1 (grid should be focused), than doscroll it 1 line (like an up arrow pressed in scrollbar), than skip -1. As opposite, when RelativeRow >= (Grid.Height-Grid.HeaderHeigh-{Hor.ScrollBarHeight})/Grid.RowHeight, DoScroll it forward than Skip.
HTH.
>Thank you that works well.
>
>There is a cosmetic problem - if you have lots of records and scroll down the table then hold down the up arrow key to scroll back upwards the scrolling in the grid is not smooth, it jumps about. The highlighted record does not remain at the top of the grid - I can live with this I think.
>
>David
>
>>Hi!
>>
>>Just define a code in the KeyPress event that skips to next/previous record in the grid's record source when up/down arrow pressed, than refresh the grid.
>>
>>>I would like to use a container control in a grid column but it then makes the up and down arrows behave like the left and right arrows when attempting to navigate up and down in the column with the container in it (i.e. focus moves to the previous or next column) - is there a way round this?
>>>
>>>NB For the sake of this discussion say that the container just contains one textbox.
>>>
>>>Many thanks
>>>
>>>David
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.