Page 1 of 1

xBrowse - 1ra. y última filas pintadas

Posted: Thu Oct 13, 2011 2:27 am
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!

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

Posted: Thu Oct 13, 2011 1:21 pm
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.

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

Posted: Fri Oct 14, 2011 3:54 am
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

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

Posted: Fri Oct 14, 2011 4:09 am
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.