1

Konu: Select ile doldurdugum Combobox bos geliyor

Merhaba,

Forumun uzerindeki Combodan sehri secilince ikinci combo da o sehre ait ilceler ilceleride secinde grid te semtler in cikmasi gibi bir sey yapmaga calisiyorum. Sehiri sectigimde ilce Combobox in arrayi doluyor (for next ile gorebiliyorum) ama listede goremiyorum.

Acaba sorun nerededir.




ComboCity.Valid ' i

Select name ;
from ilce ;
where Allt(ilce.city) = allt(countrylst(countryno, 2)) ;
into ARRAY IlceArray

IF ALEN(IlceArray) <> 0
    Dimension IlceArray(ALEN(IlceArray)+1)
    IlceArray(ALEN(IlceArray)) = " "
    = ASORT(IlceArray)
ENDIF   

WITH Thisform.cboPriceList
    .RowSourceType = 5
    .RowSource = IlceArray
ENDWITH

thisform.cboIlceList.Requery

2

Re: Select ile doldurdugum Combobox bos geliyor

Huseyin,
Combolarla array kullanacaksan ya combonun ya da formun propertysi olsun.
Burada arraye gerek yok, bosuna zahmet. Dogrudan SQLi Rowsource yap.

3

Re: Select ile doldurdugum Combobox bos geliyor

cetin bir soru,
vfp, grid de combo'yu her satır için ayrı ayrı mı dolduruyor? yoksa aynı combo listesinimi kullanıyor ?
eğer her satır için ayrı ayrı dolduruyorsa hafizayı zorlar mı?
teşekkürler.

4

Re: Select ile doldurdugum Combobox bos geliyor

cetin abi bende oyle direk SQL'i dusunmustum ama bir tane de bos kayit eklemem lazim ... 
O yuzden ComboBox icin array kullandim.

nasil bos bir kayit ekleyebilirim ?

5

Re: Select ile doldurdugum Combobox bos geliyor

huseyino yazdı:

cetin abi bende oyle direk SQL'i dusunmustum ama bir tane de bos kayit eklemem lazim ... 
O yuzden ComboBox icin array kullandim.

nasil bos bir kayit ekleyebilirim ?


Visual Fox Pro
select company,cust_id from customer ;

union ;
select " "," " from customer ;
into cursor myTableWithBosKayit

6

Re: Select ile doldurdugum Combobox bos geliyor

aydın yazdı:

cetin bir soru,
vfp, grid de combo'yu her satır için ayrı ayrı mı dolduruyor? yoksa aynı combo listesinimi kullanıyor ?
eğer her satır için ayrı ayrı dolduruyorsa hafizayı zorlar mı?
teşekkürler.


Tek bir kez dolduruyor (tabii eger kod geregi yeniden calismasi gerekmiyorsa - bir baska alana bagli iceriginin degismesi gibi)

7

Re: Select ile doldurdugum Combobox bos geliyor

cetinbasoz yazdı:
huseyino yazdı:

cetin abi bende oyle direk SQL'i dusunmustum ama bir tane de bos kayit eklemem lazim ... 
O yuzden ComboBox icin array kullandim.

nasil bos bir kayit ekleyebilirim ?


Visual Fox Pro
select company,cust_id from customer ;

union ;
select " "," " from customer ;
into cursor myTableWithBosKayit


Bende şunu yapıyorum;)

Visual Fox Pro
Select *

    From Customer ;
    Into Cursor curCombo;
    ReadWrite
Insert Into curCombo Values("", "")


Tabi bu kod hatırladığım kadarıyla VFP8 ve sonrası için kullanabiliyorum.

/o---------------------o\
     www.haser.com
\o---------------------o/

8

Re: Select ile doldurdugum Combobox bos geliyor

Tarkan,
Benim yazdigim dogrudan rowsource olsun diye:)

9

Re: Select ile doldurdugum Combobox bos geliyor

Sadece farklı bir yaklaşım olsun diye yazdım. :d

/o---------------------o\
     www.haser.com
\o---------------------o/

10

Re: Select ile doldurdugum Combobox bos geliyor

Biliyorum:) Benim demek istedigim 2 komut olunca rowsource olamiyor (belki qpr uzeriden olur hic denemedim).

11

Re: Select ile doldurdugum Combobox bos geliyor

Yarım anlattım herhalde smile Ben bu kodu direk rowsource'a uygulamıyorum. Oluşan cursor'u rowsource'a bağlıyorum.

/o---------------------o\
     www.haser.com
\o---------------------o/