BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sort by title column click on a grid

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
pcerdaz
Guest





PostPosted: Mon Dec 01, 2003 10:49 am    Post subject: Sort by title column click on a grid Reply with quote




Hy, I need to implement a sort of a data in a grid by clicking
on the title column. I know that there is a event handler for
the click on the titles of a grid, but ¿How can I identify the
column that its title was clicked? Any help will be apretiate.
Thank you.
Back to top
Jayme Jeffman Filho
Guest





PostPosted: Mon Dec 01, 2003 1:32 pm    Post subject: Re: Sort by title column click on a grid Reply with quote



Hi P,

Look at the example bellow :
void __fastcall TFConsAtd::DBGrid1TitleClick(TColumn *Column)
{
//Set Table order by Column->FieldName ;
TbMunAtend->IndexFieldNames = Column->FieldName ;
}
The Column of the DBGrid is passed as a parameter of the event handler method.

HTH

Jayme.

"pcerdaz" <pcerdaz (AT) mi (DOT) cl> wrote

Quote:

Hy, I need to implement a sort of a data in a grid by clicking
on the title column. I know that there is a event handler for
the click on the titles of a grid, but ¿How can I identify the
column that its title was clicked? Any help will be apretiate.
Thank you.


Back to top
pcerdaz
Guest





PostPosted: Thu Dec 04, 2003 1:04 pm    Post subject: Re: Sort by title column click on a grid Reply with quote



Jayme,

So simple.
I use the Paradox database and some tables have more than one
key fields, so in this case I must used the next:
TbMunAtend->IndexName = String("ByCustomerName");
Thank you.


"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Quote:
Hi P,

Look at the example bellow :
void __fastcall TFConsAtd::DBGrid1TitleClick(TColumn *Column)
{
//Set Table order by Column->FieldName ;
TbMunAtend->IndexFieldNames =3D Column->FieldName ;
}
The Column of the DBGrid is passed as a parameter of the event handler =
method.

HTH

Jayme.

"pcerdaz" <pcerdaz (AT) mi (DOT) cl> wrote in message =
news:3fcb2adb (AT) newsgroups (DOT) borland.com...
=20
Hy, I need to implement a sort of a data in a grid by clicking
on the title column. I know that there is a event handler for
the click on the titles of a grid, but =BFHow can I identify the
column that its title was clicked? Any help will be apretiate.
Thank you.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.