dblookupcombobox delhpi 7

Asked

Viewed 65 times

1

I have a problem, I put this combo, I made the link with the table everything straight it brings the list of cities, anyway, ta rodado uma blz.

I was wondering if there’s a way to put an extra option inside her, which would be, like,: ALL, São paulo, Campinas, Jundiaí;

It is passed through parameters, in sql. as q put the ALL option..

1 answer

0

Good morning Marcelo Okada. Face with the 7 I "think" that you can’t do anything DIRECT with the component. But you can do a GAMBIARRA with SQL. See the Example I give you with the city table.

id_cidade int, cidade_nome varcha(50)

In the city table I have the following cities

Rio de janeiro
São Paulo
Cidade A
Cidade B

Then I would make the following SQL to add the word ALL in the CITY TABLE and may appear in Dblukupcombobox.. Still Showing Word All As First OPTION in List.

select id_cidade, cidade_nome, 1 as ordem from cidade
union all
select -1,'TODAS' , 0 as ordem

order by 3,2

I hope I understood your need and was able to express myself clearly. Any doubt about my example is just talk.

  • hello good morning, So what would be the best program to make these software, which version of Delphi is better, or there is another?

  • 1

    Good evening. Any program you know how to use is good.. If you use a program you don’t know it will be harder to develop with it. I really like Delphi 7 and Tokyo. But I also use JAVA and PHP. There’s a vast world to choose from. The business is to select one and DROP YOUR DICK on it :). It has taste for everything.. This is mine.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.