xBrowse - 1ra. y última filas pintadas

xBrowse - 1ra. y última filas pintadas

Postby César E. Lozada » Thu Oct 13, 2011 2:27 am

Hola.
¿Cómo averiguo cuáles son la primera y la última filas pintadas en un xBrowse?

Me gustaría, por ejemplo, poder escribir el mensaje: Mostrando resultados 7 al 29 de un total de 50
y que éste se actualizara al navergar por el xbrowse.

Por supuesto, no deseo agregar una nueva columna mostrando ::bKeyNo

Gracias.
¡Salud y saludos!
User avatar
César E. Lozada
 
Posts: 128
Joined: Wed Oct 26, 2005 12:18 pm
Location: Los Teques, Miranda, Venezuela

Re: xBrowse - 1ra. y última filas pintadas

Postby nageswaragunupudi » Thu Oct 13, 2011 1:21 pm

nFirstKeyNo := oBrw:KeyNo() - oBrw:nRowSel + 1
nLastKeyNo := nFirstKeyNo + oBrw:RowCount() - 1

In case of RDD, nFirstKeyNo and nLastKeyNo are the OrdKeyNo() of the first and last records displayed.

In case of Array, nFirstKeyNo and nLastKeyNo are the first and last array elements displayed. In case of RecoreSet they are AbsolutePostion of the first and last rows.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10259
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse - 1ra. y última filas pintadas

Postby César E. Lozada » Fri Oct 14, 2011 3:54 am

Thank you very much, Mr. N.

Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).

Regards.
César Lozada
User avatar
César E. Lozada
 
Posts: 128
Joined: Wed Oct 26, 2005 12:18 pm
Location: Los Teques, Miranda, Venezuela

Re: xBrowse - 1ra. y última filas pintadas

Postby nageswaragunupudi » Fri Oct 14, 2011 4:09 am

César E. Lozada wrote:Thank you very much, Mr. N.

Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).

Regards.
César Lozada

Please reconsider. There will be hundreds of such requirements for various purposes. Should we keep modifying the main class for each such requirement? Will there be ever an end for it? Can we not make do with functions?

What makes a good case for modifying a class is when the class itself has to know these datas or methods for its own working.

Just my personal opinion.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10259
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: groiss and 9 guests