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