 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
pcerdaz Guest
|
Posted: Mon Dec 01, 2003 10:49 am Post subject: Sort by title column click on a grid |
|
|
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
|
Posted: Mon Dec 01, 2003 1:32 pm Post subject: Re: Sort by title column click on a grid |
|
|
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
|
Posted: Thu Dec 04, 2003 1:04 pm Post subject: Re: Sort by title column click on a grid |
|
|
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 |
|
 |
|
|
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
|
|