1

Konu: Grid Satırlarında InputMask

Selamlar,
Gridde tek ve çift satırdaki InputMask ları farklı yapmak
istiyorum mümkümü?

InputMask='9,999,999' tek satırlar
InputMask='9.999' çift satırlar

Bilmediğin Neyse Yanıldığındır.

2

Re: Grid Satırlarında InputMask

Cevabı buldum fakat grid gridenumeric olunca çalışmıyor. Nasıl çözebilirim.

Visual Fox Pro
#Define CURRENCYMASK_LOC '999,999,999'

Select CrSonuc1
lccosayi=Fcount('CrSonuc1')
Go Top
With Thisform.grid2
    .ColumnCount=m.lccosayi
    .RecordSourceType= 1
    .RecordSource="CrSonuc1"
    For liColIndex=2 To .ColumnCount-1
        With .Columns(liColIndex)
            If Upper(.CurrentControl) == 'TEXT1'
                .Text1.Visible = .F.
                .AddObject('Text2','gridenumeric')
                .Text2.Visible = .T.
                .CurrentControl = 'Text2'
                .Text2.InputMask=CURRENCYMASK_LOC
                .RemoveObject('Text1')
                .Text2.Name = 'Text1'
                .Sparse=.F.
            Endif
        Endwith
    Endfor
    .SetAll("dynamicbackcolor", "", "Column")
    .SetAll("dynamicbackcolor", ;
        "IIF(CrSonuc1.total=1,rgb(67,254,100),IIF(CrSonuc1.total=2,rgb(240,189,36),IIF(CrSonuc1.total=3,rgb(255,255,128),IIF(CrSonuc1.total=4,rgb(255,128,255),rgb(0,0,0)))))", "Column")
ENDWITH
 
Thisform.grid2.SetAll("DynamicInputMask","(iif(CrSonuc1.total=4,'999.999','999,999,999'))")

Visual Fox Pro
Define Class gridenumeric As TextBox

    Procedure GotFocus
    Thisform.lcdegisken2=This.Value
    Endproc
    Procedure LostFocus
    If Thisform.lcdegisken2<>This.Value
        Thisform.hesap
    Endif
    Endproc
Enddefine
Bilmediğin Neyse Yanıldığındır.

3 Son düzenleyen, mrduyar (31.03.2011 13:25:36)

Re: Grid Satırlarında InputMask

gridenumeric kullanmadan.
Gride gridenumeric işlemlerini yaptırmanın bir yolu varmı?

Visual Fox Pro
CreateCursor_CRSONUC1()

 
 
Procedure CreateCursor_CRSONUC1
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
"M-1704424254.I,1",0.000,0.000,3000.000,0.000,0.000,0.000,0.000,0.000,2000.000,0.000,0.000,3000.000,0.000,0.000,2000.000,0.000,0.000,0.000,0.000,0.000,0.000,1.000,1.70
"M-1704424254.I,1",3000.000,1500.000,0.000,0.000,0.000,0.000,0.000,0.000,1000.000,1000.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,2.000,1.70
"M-1704424254.I,1",1500.000,3000.000,0.000,0.000,0.000,0.000,0.000,0.000,-1000.000,0.000,0.000,-3000.000,-3000.000,-3000.000,-5000.000,-5000.000,-5000.000,-5000.000,-5000.000,-5000.000,-5000.000,3.000,1.70
"M-1704424254.I,1",0.944,0.944,0.000,0.000,0.000,0.000,0.000,0.000,0.630,0.630,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,4.000,1.70
"M-9000121313.C,1",0.000,0.000,6000.000,0.000,0.000,0.000,6000.000,0.000,0.000,4000.000,0.000,5000.000,0.000,5000.000,0.000,3000.000,6000.000,0.000,0.000,0.000,0.000,1.000,0.98
"M-9000121313.C,1",3000.000,2000.000,1000.000,0.000,0.000,0.000,0.000,3000.000,3000.000,3000.000,3000.000,3000.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,2.000,0.98
"M-9000121313.C,1",3000.000,5000.000,0.000,0.000,0.000,0.000,-6000.000,-3000.000,0.000,-1000.000,2000.000,0.000,0.000,-5000.000,-5000.000,-8000.000,-14000.000,-14000.000,-14000.000,-14000.000,-14000.000,3.000,0.98
"M-9000121313.C,1",1.089,0.726,0.363,0.000,0.000,0.000,0.000,1.089,1.089,1.089,1.089,1.089,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,4.000,0.98
"M-9000466423.A,1",0.000,0.000,0.000,0.000,0.000,1000.000,0.000,0.000,3000.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,1.000,1.50
"M-9000466423.A,1",0.000,0.000,0.000,0.000,1000.000,1000.000,0.000,1000.000,1000.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,2.000,1.50
"M-9000466423.A,1",0.000,0.000,0.000,0.000,1000.000,1000.000,1000.000,2000.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,3.000,1.50
"M-9000466423.A,1",0.000,0.000,0.000,0.000,0.556,0.556,0.000,0.556,0.556,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,4.000,1.50
"M-1704424066.I,1",0.000,4800.000,1600.000,1600.000,4800.000,3200.000,1600.000,3200.000,0.000,1600.000,3200.000,0.000,3200.000,9600.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,1.000,1.70
"M-1704424066.I,1",1600.000,3200.000,1600.000,1600.000,3200.000,3200.000,3200.000,1600.000,3200.000,3200.000,3200.000,3200.000,3200.000,0.000,0.000,1600.000,3200.000,0.000,0.000,0.000,0.000,2.000,1.70
"M-1704424066.I,1",1600.000,0.000,0.000,0.000,-1600.000,-1600.000,0.000,-1600.000,1600.000,3200.000,3200.000,6400.000,6400.000,-3200.000,-3200.000,-1600.000,1600.000,1600.000,1600.000,1600.000,1600.000,3.000,1.70
"M-1704424066.I,1",1.007,2.015,1.007,1.007,2.015,2.015,2.015,1.007,2.015,2.015,2.015,2.015,2.015,0.000,0.000,1.007,2.015,0.000,0.000,0.000,0.000,4.000,1.70
"M-9000134888.A,7",58.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,2.000,0.00
"M-9000225830.A,3",56.993,54.978,53.971,52.964,50.949,48.934,46.919,45.912,43.897,41.882,39.867,37.852,35.837,35.837,35.837,34.830,32.815,32.815,32.815,32.815,32.815,1.000,2.20
"M-9000225830.A,3",0.047,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,2.000,2.20
"M-9000225830.A,3",-56.946,-111.924,-165.895,-218.859,-269.808,-318.742,-365.661,-411.573,-455.470,-497.352,-537.219,-575.071,-610.908,-646.745,-682.582,-717.4