473,414 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Message about a datagrid/dbgrid

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.

Sep 4 '06 #1
2 1575
I've already gave solution to this problem, so don't worry.
Because nobody wants tell me anything about this. Thanks. OK
nano9 wrote:
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.
Sep 7 '06 #2
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
nano9 wrote:
I've already gave solution to this problem, so don't worry.
Because nobody wants tell me anything about this. Thanks. OK
nano9 wrote:
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.
Sep 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: The Cleaning Wonder Boy | last post by:
I am working to converta Delphi application to a C# Winform application. Coming from the Delphi world of 1. Drop a Dataset on the form 2. Drop a Datasource on the form 3. Drop a DBGrid on the...
4
by: Ramtin | last post by:
Hi I have a DBGrid which returns some Arabic data .The charset of web page is utf-8 and anything on page is OK except DBGrid header titles . I set these titles through DBGrid Property Builder ,...
0
by: Ramtin | last post by:
Hi I have a DBGrid which returns some Arabic data .The charset of web page is utf-8 and anything on page is OK except DBGrid header titles . I set these titles through DBGrid Property Builder ,...
0
by: basha | last post by:
hi friends, I am usieng Dbgrid in my asp.net project, my requirement is in dbgrid i am displaying 10 records per page and i place one button on a webform for each record i am generating one...
2
by: Saladin | last post by:
Hello Trying to make winform which includes datagrid ... 1) Customer wants to be able to click on particular dg cell which will open another form and copy the value to a textbox. Something to...
4
by: Price Brattin | last post by:
I dragged a datagrid onto a VB.Net WinForm and used the properties page and a few lines of code to set it up, including the DataSource. No wizard setup was used. It works fine except for one...
0
by: siyoyok007 | last post by:
hi guyz.....i just wanna ask is it posibble to change row colors in either datagrid or dbgrid. Its like for row number 1, the color is blue then row number 2 the color is white and then row number 3...
0
by: Quadran | last post by:
Hello everybody, I am new here and therefore hope nothing doing wrong, I have a DBGrid in C++ Builder 6.0 containing 26 cells and 12 rows In each cell there is a number stored and this...
1
by: stv972 | last post by:
Im a newbie in vb programming. i got to learn the loops thru books and surfing the net. Nwys im making a program now and m using dbgrid where i want to add data directly to the grid. I have already...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.