problem to erase rows of xbrowse - RESOLVED
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
problem to erase rows of xbrowse - RESOLVED
I must erase all rows of a xbrowse ( array) but not the first rows I made
For n=1 to Len(oBrowse:aArrayData)
IF ! n = 1 // oBrowse:nArrayAt = 1
ADel( oBrowse:aArrayData, n, .t. )
oBrowse:MakeTotals()
oBrowse:Refresh()
CalcoloTotali2(oBrowse,aGet,@nSconto,@nSubtotale,@nTotale)
endif
next
but erase only the last row
how I can resolve i t?
For n=1 to Len(oBrowse:aArrayData)
IF ! n = 1 // oBrowse:nArrayAt = 1
ADel( oBrowse:aArrayData, n, .t. )
oBrowse:MakeTotals()
oBrowse:Refresh()
CalcoloTotali2(oBrowse,aGet,@nSconto,@nSubtotale,@nTotale)
endif
next
but erase only the last row
how I can resolve i t?
Last edited by Silvio.Falconi on Sun Nov 24, 2019 11:33 am, edited 1 time in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: problem to erase rows of xbrowse
This not run ?Silvio.Falconi wrote:I must erase all rows of a xbrowse ( array) but not the first rows I made
For n=1 to Len(oBrowse:aArrayData)
IF ! n = 1 // oBrowse:nArrayAt = 1
ADel( oBrowse:aArrayData, n, .t. )
oBrowse:MakeTotals()
oBrowse:Refresh()
CalcoloTotali2(oBrowse,aGet,@nSconto,@nSubtotale,@nTotale)
endif
next
but erase only the last row
how I can resolve i t?
Code: Select all
For n=1 to Len(oBrowse:aArrayData)
IF ! n = 1 // oBrowse:nArrayAt = 1
//ADel( oBrowse:aArrayData, n, .t. )
oBrowse:SetPos( 2, 1 )
oBrowse:Delete()
//oBrowse:MakeTotals()
//oBrowse:Refresh()
CalcoloTotali2(oBrowse,aGet,@nSconto,@nSubtotale,@nTotale)
endif
next
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem to erase rows of xbrowse
no I tried also with
Code: Select all
Static Function DeleteAllRows( oBrowse,aGet )
Local n
if msgYesNo( i18n("¿ E' sicuro che devo cancellare tutto ?") )
if ! Empty( oBrowse:aArrayData )
For n=1 to Len(oBrowse:aArrayData)
IF ! n = 1
oBrowse:SetPos( n, 1 )
oBrowse:Delete()
// ADel( oBrowse:aArrayData, n, .t. )
// oBrowse:MakeTotals()
// oBrowse:Refresh()
//CalcoloTotali2(oBrowse,aGet,@nSconto,@nSubtotale,@nTotale)
endif
next n
Endif
Endif
return nil
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem to erase rows of xbrowse
Cristobal
on oldest function run ok
Static Function DeleteAllRows( oBrowse,aGet )
if msgYesNo( i18n("¿ E' sicuro che devo cancellare tutto ?") )
if ! Empty( oBrowse:aArrayData )
aSize( oBrowse:aArrayData, 0 )
oBrowse:Refresh()
oBrowse:MakeTotals()
CalcoloTotali(oBrowse,aGet)
endif
Endif
return nil
but it erase all records
I wish no erase the first row
on oldest function run ok
Static Function DeleteAllRows( oBrowse,aGet )
if msgYesNo( i18n("¿ E' sicuro che devo cancellare tutto ?") )
if ! Empty( oBrowse:aArrayData )
aSize( oBrowse:aArrayData, 0 )
oBrowse:Refresh()
oBrowse:MakeTotals()
CalcoloTotali(oBrowse,aGet)
endif
Endif
return nil
but it erase all records
I wish no erase the first row
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: problem to erase rows of xbrowse
Add the first line again
Add (oBrowse: aArrayData, {...................})
Add (oBrowse: aArrayData, {...................})
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem to erase rows of xbrowse
is it a Joke ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: problem to erase rows of xbrowse
Silvio, I will remember that xBrowse needs a minimum of 1 entry.
Regards,
Otto
Regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: problem to erase rows of xbrowse
The best way is:
This is also possible
Code: Select all
ASize( oBrw:aArrayData, 0 )
oBrw:MakeTotals()
oBrw:Refresh()
Code: Select all
do while oBrw:nLen > 0
oBrw:Delete()
enddo
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: problem to erase rows of xbrowse
The best way is:
This is also possible
Code: Select all
ASize( oBrw:aArrayData, 0 )
oBrw:MakeTotals()
oBrw:Refresh()
Code: Select all
do while oBrw:nLen > 0
oBrw:Delete()
enddo
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem to erase rows of xbrowse
Nages,
I Wish no erase the First row of array
I Wish no erase the First row of array
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- FranciscoA
- Posts: 1964
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: problem to erase rows of xbrowse
Silvio, try this way.
Code: Select all
//---------------------------//
function Borrando(aArray,oBrw)
local n
oBrw:nArrayAt := 2
For n := 2 to oBrw:nLen
ADel( aArray, oBrw:nArrayAt, .f. )
ASize(aArray,1)
oBrw:Refresh()
Next
Return nil
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
Chinandega, Nicaragua.
Fwxh1204-MySql-TMySql
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: problem to erase rows of xbrowse
Silvio.Falconi wrote:Nages,
I Wish no erase the First row of array
Code: Select all
ASize( oBrw:aArrayData, 1 )
oBrw:MakeTotals()
oBrw:Refresh()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem to erase rows of xbrowse
good I resolved
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC