Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread fredvs
Re-hello Med. With this it compiles but I did not test for database: if twidgetcols(atwidgetgrid.datacols[i]).getitemclasstype = tgridintegerdatalist then ; Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ___ mseide-msegui-tal

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread fredvs
Hello Med. > if .col[i] is tdbintegeredit then b1 else b2 In a form1.mfm, the kind of widget is declared as this: object atwidgetgrid: twidgetgrid ... datacols.count = 1 datacols.items = < item[something] width = 20

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread Sieghard
Hello mohamed, you wrote on Thu, 20 May 2021 13:07:57 +: >Your answer deserves to be applied but my firebird data fields > to be sumed are either integer (16,32,64 bits) or numeric (x,y). > Numeric (x,y) is compatible with currency Var. Right, Numeric is compatible with currency,

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread mohamed hamza
Hello Fred, We can make procedure better if we have access to the kind of widget contained into grid.col we can do if .col[i] is tdbintegeredit then b1 else b2 currently tag is an index to the field and can cause an error . Med __

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread fredvs
Hi Med. > Numeric (x,y) Hum, indeed, I just check and there is that "numeric" type for DB (that I did not know). I have to deeply study those DB features. (And it is why some demos from you will be more than welcome). Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ _

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread mohamed hamza
Hi Sieghard, Your answer deserves to be applied but my firebird data fields to be sumed are either integer (16,32,64 bits) or numeric (x,y). Numeric (x,y) is compatible with currency Var. Regards Med De : Sieghard Envoyé : jeudi 20 mai 2021 10:30

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread Sieghard
On Tue, 18 May 2021 11:30:32 -0700 (MST) fredvs wrote: > (But I like your first peace of code too.) Well, let that second piece rest in peace, rather... > For the new code, maybe using a variant variable and create a new > sumfield() procedure: Yes, that might be a more general solution. It's

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-20 Thread Sieghard
On Tue, 18 May 2021 18:13:10 + mohamed hamza wrote: > I want to change this peace of code > > procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer); > VAR n:currency; nn:integer; iCol:integer; oField:TField; ... > with this one ... > procedure tfrmbasePagefo.DoSum(oDbGrid: T