Message about a datagrid/dbgrid

  • Thread starter Thread starter nano9
  • Start date Start date
N

nano9

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.
 
I've already gave solution to this problem, so don't worry.
Because nobody wants tell me anything about this. Thanks. OK
 
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

Similar Threads


Back
Top