xBrowse - 1ra. y última filas pintadas

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

xBrowse - 1ra. y última filas pintadas

Post by César E. Lozada »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

Post by nageswaragunupudi »

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
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

Post by César E. Lozada »

Thank you very much, Mr. N.

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

Regards.
César Lozada
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

Post by nageswaragunupudi »

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
Post Reply