PDA

View Full Version : Re: Focus in dbGrid



Dennis Piccioni
8-Feb-2005, 10:15 AM
Hi Joe,

make sure that the Ordering property of the dbGrid and the DD that acts
as the dbGrid's server use the same index. You may have to add a
statement to the DD like "set Ordering to 2".

Regards,
Dennis


-----Original Message-----
From: Joe Coley [mailto:sjoec@charter.net]
Posted At: Tuesday, February 08, 2005 9:55 AM
Posted To: visual-dataflex
Conversation: Focus in dbGrid
Subject: Re: Focus in dbGrid


After further investigation it seems that a "find next/find previous"
(on the header record) is what is causing the problem. I'm thinking
that this will use the index of the field from which the find is done,
and display is NOT according to the index that is being specified in the
table. I'm thinking that maybe I want to force reordering of the table
according to the table index on all finds. (My expectation is however
that if a dbgrid specifies display according to say, index 5, then under
no conditions should it display according to index 1 --- and that at
this point SEEMS to be what is happening.)

Could this be a "bug" in 10.1? What is the expected behavior?


"Garret Mott" <garret@automatesoftware.com> wrote in message
news:hUKBWseDFHA.1248@dacmail.dataaccess.com...
> Joe -
>
> Not sure you want to add it to the Grid, but wherever you are finding
> the header record, after the find is done, Send Beginning_of_Data to
> the grid.
>
> That should set it on the first row.
>
> HTH
>
> Garret
>
>
> "Joe Coley" <sjoec@charter.net> wrote in message
> news:ANg61eeDFHA.1912@dacmail.dataaccess.com...
> > Using VDF 10.1 Native DF, I have a dbGrid which is displaying data
> > using
a
> > date index in reverse order (most recent to oldest/blank date). The
grid
> > data is constrained by a header record. I want to ensure that when
> > data is displayed the focus is ALWAYS on the grid record that has
> > the most
recent
> > date. For some reason, it appears that this does not always happen.
The
> > index being called out is the related field of the header, the date,

> > recnum. Isn't there some command that I can add to the table which
> > will force focus
> > to the first record of the index?
> >
> >
>
>

Joe Coley
8-Feb-2005, 10:34 AM
Thanks Dennis -- the "set Ordering to 2" that you suggested is giving me
what I want in this application. Problem solved. Can't say I really
understand the "why" but it's working now so the understanding will come
with a few more years of practice :-) !

"Dennis Piccioni" <dennis-p@dataaccess.com> wrote in message
news:9K6g4DfDFHA.5740@dacmail.dataaccess.com...
Hi Joe,

make sure that the Ordering property of the dbGrid and the DD that acts
as the dbGrid's server use the same index. You may have to add a
statement to the DD like "set Ordering to 2".

Regards,
Dennis


-----Original Message-----
From: Joe Coley [mailto:sjoec@charter.net]
Posted At: Tuesday, February 08, 2005 9:55 AM
Posted To: visual-dataflex
Conversation: Focus in dbGrid
Subject: Re: Focus in dbGrid


After further investigation it seems that a "find next/find previous"
(on the header record) is what is causing the problem. I'm thinking
that this will use the index of the field from which the find is done,
and display is NOT according to the index that is being specified in the
table. I'm thinking that maybe I want to force reordering of the table
according to the table index on all finds. (My expectation is however
that if a dbgrid specifies display according to say, index 5, then under
no conditions should it display according to index 1 --- and that at
this point SEEMS to be what is happening.)

Could this be a "bug" in 10.1? What is the expected behavior?


"Garret Mott" <garret@automatesoftware.com> wrote in message
news:hUKBWseDFHA.1248@dacmail.dataaccess.com...
> Joe -
>
> Not sure you want to add it to the Grid, but wherever you are finding
> the header record, after the find is done, Send Beginning_of_Data to
> the grid.
>
> That should set it on the first row.
>
> HTH
>
> Garret
>
>
> "Joe Coley" <sjoec@charter.net> wrote in message
> news:ANg61eeDFHA.1912@dacmail.dataaccess.com...
> > Using VDF 10.1 Native DF, I have a dbGrid which is displaying data
> > using
a
> > date index in reverse order (most recent to oldest/blank date). The
grid
> > data is constrained by a header record. I want to ensure that when
> > data is displayed the focus is ALWAYS on the grid record that has
> > the most
recent
> > date. For some reason, it appears that this does not always happen.
The
> > index being called out is the related field of the header, the date,

> > recnum. Isn't there some command that I can add to the table which
> > will force focus
> > to the first record of the index?
> >
> >
>
>