473,748 Members | 11,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Status de un dbgrid

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
- VirtualItemCoun t
- PageCount
- CurrentPageInde x

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
VirtualItemCoun t 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_PageIn dexChanged(obje ct source, DataGridPageCha ngedEventArgs
e) y ni siquiera con eso me actualiza el MyDbgrid.Curren tPageIndex
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

Aug 30 '06 #1
3 2900
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
- VirtualItemCoun t
- PageCount
- CurrentPageInde x

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 VirtualItemCoun t 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_PageIn dexChanged(obje ct source,
DataGridPageCha ngedEventArgs e)
and not even with this do I get a changed MyDbgrid.Curren tPageIndex
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.

nano9 wrote:
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
- VirtualItemCoun t
- PageCount
- CurrentPageInde x

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
VirtualItemCoun t 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_PageIn dexChanged(obje ct source, DataGridPageCha ngedEventArgs
e) y ni siquiera con eso me actualiza el MyDbgrid.Curren tPageIndex
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
Aug 30 '06 #2
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

Sep 7 '06 #3
Oh nooooooo, I continue with the same problem, the event void
MyDbgrid_PageIn dexChanged(obje ct source, DataGridPageCha ngedEventArgs
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:
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
Sep 7 '06 #4

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

Similar topics

0
3459
by: Paolo | last post by:
Hi to all, could you please help me with this issue? I'd like to have the rows of a VB6 ADO grid bound to a db painted with an alternate background and foreground colors. I'd like to have the odd rows with a x color and the even rows with a y color. What kind of grid do I have to use? And how can I do it? Moreover, I'd like to choose custom colors for the selected rows as well.Usign the DBgrid control I can't. I'd appreciate very much...
1
4198
by: mehafi | last post by:
hello how could I get value showing in DBGrid table to a variable? For egzamle: I'd like to get value from 3'rd collumn and 2'nd row and put it into a variable "int z". How coul I do it? - what method / propierties should I used? thanks Adam
4
1957
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 , but on web page they can not be readable. What is problem? Thanks K.Ramtin
0
1414
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 , but on web page they can not be readable. What is problem? Thanks K.Ramtin
0
1478
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 checkbox, that i place in template of dbgrid, when the user select checkboxs of rows all the rows should be deleted (I am displaying date in dbgrid from oracle database) for that i am not getting code, pls can u help me i have dead line now i am...
1
2645
by: Bill | last post by:
I need help!!! I have a form that is populated with a dbgrid from a Access database. When I open the form, it has 17 records. When i click on a record, I need a different form to open and go to the related record from the first form. Table relationships are; tbl 1 fld -action id
2
1589
by: nano9 | last post by:
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...
0
1702
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 number can be 0,1->10, -1 or -9 each representing a code.
1
2442
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 textboxes coded for data entry but i recently found out that i can directly enter data using the grid. I already set custom properties of dbgrid AllowAddNew, AllowDelete and AllowUpdate to true but it seems the grid is still lock even though there...
0
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.