1

Konu: Grid Refresh olmuyor

merhaba arkadaşlar hemen bi soru daha sorcam size

1.) iki tane tablomuz var. Birinde personele ait bilgileri eklediğimiz tablo (personellist)
2.) Diğeri ise o personele ait izinleri kaydettiğimiz tablo (izinler) .

Şimdi ben Bir personele ait bilgileri (1. de belirttiğim şekilde) textboxlar ile almakta iken 2. belirttiğim tablodaki izinleri gridde gösteriyom.

Fakat Altta bulunan buttongrup taki next e basınca diger personele geçiyo.
Gridde yer alan o personele ait bilgiler geçmiyor.

Bilgi : Ortak field : adisoyadi

Yani izinleri kaydettigim formda bir textbox içinde controlsource = personellist.adisoyadi
bununla kaydediyorum.

Özetle sorun şu ki : bir personelden digerine geçitigimde griddeki bilgi de digerine geçmeli.



http://img117.imageshack.us/img117/4631/111rf2.jpg

2

Re: Grid Refresh olmuyor

iki dosyayı birbirine bağlayan ortak bir alanı relasyon olarak gridde tanımlamalısın.
ozaman sorunun çözülür zannedersem

3 Son düzenleyen, cetinbasoz (28.04.2007 15:48:57)

Re: Grid Refresh olmuyor

Gridin linkmaster,childorder,relationalexpr alanlarini doldurdun mu? Ya da eski klasik sekilde Zekinin soyledigi relation islerini yaptin mi?

Visual Fox Pro
public oForm

oForm = createobject('MyForm')
oForm.show()
 
define class myForm as form
    height=400
    width =600
    datasession = 2
    topRecord = 0
    bottomRecord = 0
    tableAlias = ''
 
    add object txtCustomerID as textbox ;
        with top=10,left=10,controlsource='Customer.Cust_id',anchor=1+2
    add object txtCompany as textbox ;
        with top=40,left=10,controlsource='Customer.Company',anchor=1+2
    add object txtContact as textbox ;
        with top=70,left=10,controlsource='Customer.Contact',anchor=1+2
    add object btnNavGroup as commandgroup with left = 140, top = 10,anchor=1+2
    add object grdOrders as grid ;
        with top=110,height=280,width=600,anchor=1+2+4+8,;
        recordsource='Orders',;
        linkmaster='Customer',;
        childorder='Cust_id',;
        relationalexpr='Cust_id'
 
    procedure load
        use customer in 0
        use orders in 0
    endproc
 
    procedure init
        this.tableAlias = 'Customer'
        select customer
        go bottom
        this.bottomrecord = recno()
        locate
        this.toprecord = recno()
        this.NavRefresh()
    endproc
 
    procedure btnNavGroup.click
        select (thisform.tableAlias)
        do case
            case this.value = 1
                locate
            case this.value = 2
                skip -1
            case this.value = 3
                skip
            case this.value = 4
                go bottom
        endcase
        thisform.NavRefresh()
        thisform.refresh()
    endproc
 
    procedure btnNavGroup.init
        this.buttoncount = 4
        this.setall('width',100)
        this.setall('top',1)
        local ix
        for ix=1 to 4
            this.buttons[m.ix].left = 1 + (100 + 2) * (m.ix-1)
        endfor
        this.buttons[1].caption = "ilk kayit"
        this.buttons[2].caption = "onceki kayit"
        this.buttons[3].caption = "sonraki kayit"
        this.buttons[4].caption = "son kayit"
        this.height = this.buttons[1].height + 2
        this.width  = (100 + 2) * this.buttoncount
    endproc
 
    procedure NavRefresh
        with this.btnNavGroup
            store !( recno(this.tableAlias) = this.topRecord ) to ;
                .buttons[1].enabled,.buttons[2].enabled
            store !( recno(this.tableAlias) = this.bottomRecord ) to ;
                .buttons[3].enabled,.buttons[4].enabled
        endwith
    endproc
enddefine

4

Re: Grid Refresh olmuyor

arkadaşlar dediklerinizi yaptım olmadı. ayrıca acaip bir sorunum daha oluştu. alttaki navbarı kullanıyorum. üstteki personellist tablosunu kullanmıyor textinputlarda. alttaki izin tablosunu formun her yerinde kullanıyor.