Status de un dbgrid

N

nano9

Hola gente quisiera que alguien me pudiera ayudar con un problemilla
que tengo, resulta que estoy programando en ASP con C# y estoy usando
un cadbgrid que se comporta parecido a un datagrid o dbgrid pero tiene
otras peculiaridades ahi que facilitan muchas tareas. Si alguno ha
usado este control talvez me podria ayudar.

El asunto esta asi, estoy queriendo agregar un mensaje en una etiqueta
debajo del grid para indicar la cantidad de items mostrados en una
pagina, los items totales y la pagina actual vista.

El mensaje iria mas o menos asi: "Items 1-10 de 25 | Pagina actual: 1
de 3"

Para eso estoy usando las propiedades de un dbgrid que son:
- PageSize
- VirtualItemCount
- PageCount
- CurrentPageIndex

pero qué pasa que al presionar en el boton de navegacion ya sea ">" o
"<" que uso para moverme entre paginas entonces los valores q tengo q
imprimo en la etiqueta no cambian, el unico q si cambia es el de
VirtualItemCount cuando hago una insercion o elimino un item pero los
demas no se me actualizan ni al hacer un databinding sobre el dbgrid.

Tengo programado tambien el metodo de protected void
MyDbgrid_PageIndexChanged(object source, DataGridPageChangedEventArgs
e) y ni siquiera con eso me actualiza el MyDbgrid.CurrentPageIndex
cuando le asigno e.NewPageIndex. Ya llevo rato en eso y nada, si
alguien me pudiera ayudar o decirme q ya esto esta implementado es solo
de activarlo, pues si me pueden echar una manita magnifico. OK
 
B

Bruce Wood

Translation:

Hi. Maybe someone can help me with a small problem. I am programming in
ASP using C# and I am using a cadbgrid which acts similar to a datagrid
or dbgrid but it has some peculiarities that make for a lot of work. If
anyone has used this control maybe you can help me.

The problem is this: I want to put together a message below the grid to
indicate the number of items shown on a page, the item totals and the
page number.

The message would go more or less like this, "Items 1-10 of 25 | Page 1
of 3"

To accomplish this I'm using the properties of a dbgrid, which are:
- PageSize
- VirtualItemCount
- PageCount
- CurrentPageIndex

but what is happening is that upon pressing the page navigation button
">" or "<" changes pages and the values displayed in the grid, but the
values that I display in the grid don't change. The only thing that
changes is VirtualItemCount when I make an insertion or delete an item,
but the others don't change, not even when making a data binding on the
dbgrid.

I have also written the protected method
protected void MyDbgrid_PageIndexChanged(object source,
DataGridPageChangedEventArgs e)
and not even with this do I get a changed MyDbgrid.CurrentPageIndex
when I assign a new e.NewPageIndex. I've worked on this for a while and
gotten nowehere... if someone could help me or tell me if what I want
is already implemented but just needs to be activated in some way, it
would be a great help.
 
N

nano9

jeje ya lo solucioné, ni se preocupen. Porque ni uno quiso decirme
nada. Gracias. OK

Translation:
Je, je. I've already gave solution to this problem, so don't worry.
Because nobody wants tell me anything about this. Thanks. OK
 
N

nano9

Oh nooooooo, I continue with the same problem, the event void
MyDbgrid_PageIndexChanged(object source, DataGridPageChangedEventArgs
e) doesn't work properly, indeed I debug the code step to step but it
never enters to this method, help me please!! Or tell me what is the
best solution with a CADBGrid Control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top