DBGRID - Wrapping issue 
Author Message
 DBGRID - Wrapping issue

I am using a DBGRID component.

I want to set it up so that when you hit tab in the last column the
current active field goes back to the first record.
An example
I have a databses with 3 fields and 2 records
The currently active record is record 3

1 2 >3<
4 5 6

If I was to hit tab then the active record would meove to 4
like this
1 2 3

Quote:
>4< 5 6

What i want is the result of a tab press to be
Quote:
>1< 2 3

4 5 6

Is there any way to tell if you are in the last column of a grid ??
NOTE : this is not necessarily the last field in the underlying
database. (I am actually using infopower so I can change them around)

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 DBGRID - Wrapping issue
In OnKeyDown event you can wtite the next:

if (Key = VK_TAB) and
   (DBGrid1.SelectedIndex = DBGrid1.Columns.Count-1) then
  DBGrid1.DataSource.DataSet.First

--
With best regards, Mike Shkolnik.


WEB: http://www.geocities.com/SiliconValley/Grid/3989
          http://www.geocities.com/mshkolnik


Quote:
>I am using a DBGRID component.

>I want to set it up so that when you hit tab in the last column the
>current active field goes back to the first record.
>An example
>I have a databses with 3 fields and 2 records
>The currently active record is record 3

>1 2 >3<
>4 5 6

>If I was to hit tab then the active record would meove to 4
>like this
>1 2 3
>>4< 5 6

>What i want is the result of a tab press to be
>>1< 2 3
>4 5 6

>Is there any way to tell if you are in the last column of a grid ??
>NOTE : this is not necessarily the last field in the underlying
>database. (I am actually using infopower so I can change them around)

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Word Wrap in Column Headings of DBGrid?

2. Word Wrap in Column Headings of DBGrid?

3. Line wrapping and sideways scrolling

4. Wrap text in ReportSmith

5. Wrapping occuring im my graph

6. How to wrap lines in column title

7. How to: Shrink wrap BDE network product

8. Help with Word Wrap Routine

9. wrap-around string for record

10. OWL's TEdit and wrapping

11. Word Wrapping

12. Turning of the wrap

 

 
Powered by phpBB® Forum Software