Konu: GRID TAZELEME
1-Git1 = "0" Program başında "Git1" değişkenine "0" değeri atıyorum.
2- GRID de
IF git1="0"
musf1="ucret.mf0"
musf2="ucret.md0"
ELSE
musf1="ucret.mf"+VAL(git1)
musf2="ucret.md"+VAL(git1)
ENDIF
.Column5.Header1.Caption = 'İşem Fiyatı'
.Column5.Width = 90
.Column5.ControlSource = "&musf1"
.Column6.Header1.Caption = 'Döviz'
.Column6.Width = 50
.Column6.ControlSource = "&musf2"
6. ve 7. kolunda "0" değerini gösteriyorum.
3- "Procedure PPEdit " te "Git1" e yeni bir değer atadım ve "GRID" i tazeledim.
git1=.FatFirma1.value
.grdListe.Refresh()
.grdListe.SetFocus()
4- Amacım yeni atanan değere göre "ELSE den sonraki kısım" GRID te göstermek. Ama GRIDI tazelediğim halde olmadı .Sorun nerede olabilir ?
IF git1="0"
musf1="ucret.mf0"
musf2="ucret.md0"
ELSE
musf1="ucret.mf"+VAL(git1)
musf2="ucret.md"+VAL(git1)
ENDIF
.Column5.Header1.Caption = 'İşem Fiyatı'
.Column5.Width = 90
.Column5.ControlSource = "&musf1"
.Column6.Header1.Caption = 'Döviz'
.Column6.Width = 50
.Column6.ControlSource = "&musf2"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ADD OBJECT FatFirma1 AS combobox WITH ;
Top = 2, ;
left = 330, ;
Width = 150, ;
BackColor = 65535, ;
rowsourcetype=2,;
rowsource="Musteri.adi,no",;
boundcolumn=2,;
columncount=2,;
columnwidths="250,60,0",;
Enabled = .T.
******************************************************************
Procedure ppEdit
******************************************************************
With oForm
git1=.FatFirma1.value
.grdListe.Refresh()
.grdListe.SetFocus()
EndWith
EndProc
******************************************************************
Define Class myGrid as Grid
******************************************************************
* Top = 62
Top = 140
Left = 2
Height = 400
Width = 1045
ColumnCount = 6
DeleteMark = .F.
RecordMark = .t.
ReadOnly = .T.
RecordSource = "ucret"
ScrollBars = 3
GridLineColor = Rgb(192,192,192)
Procedure Init
With this
* Scatter Name This.oRecord Memo
.Column1.Header1.Caption = 'Sıra'
.Column1.Width = 30
.Column1.ControlSource = "ucret.no"
.Column2.Header1.Caption = 'İşlem Adı'
.Column2.Width = 230
.Column2.ControlSource = "ucret.adi"
.Column3.Header1.Caption = 'İşem Fiyatı'
.Column3.Width = 90
.Column3.ControlSource = "ucret.fiyat"
.Column4.Header1.Caption = 'Döviz'
.Column4.Width = 50
.Column4.ControlSource = "ucret.doviz"
IF git1="0"
musf1="ucret.mf0"
musf2="ucret.md0"
ELSE
musf1="ucret.mf"+VAL(git1)
musf2="ucret.md"+VAL(git1)
ENDIF
.Column5.Header1.Caption = 'İşem Fiyatı'
.Column5.Width = 90
.Column5.ControlSource = "&musf1"
.Column6.Header1.Caption = 'Döviz'
.Column6.Width = 50
.Column6.ControlSource = "&musf2"
EndWith
this.SetAll('Enabled',.f.,'textbox')
this.SetAll('DisabledForeColor',0,'textbox')
EndProc
Procedure AfterRowColChange
Lparameters nColIndex
DoDefault(nColIndex)
With oForm
.txtadi.Value = Adi
.txtfiyat.Value = Fiyat
.txtdoviz.Value = Doviz
EndWith
Thisform.Refresh()
EndProc
EndDefine