Hello,
With a datagrid (asp.net 2), how do I do to have a query's total.
When I use GridView1.rows. count, I had the total for a page but not for all
pages.
(I don't wish to use a second query : "select count(*) from ...)"
Thanks by advance
arno 2 1383
Not certain about in 2.0
But you could either check in the datasource your binding to the drig
so if:
GridView1.DataS ource = MyDataTable;
you could check
MyDataTable.Row s.Count
Alternately, the other way you could take it out of the datasource
int MyCount = ((DataTable)Gri dView1.DataSour ce).Rows.Count;
or
int MyCount = ((DataSet)GridV iew1.DataSource ).Tables[0].Rows.Count;
HTH
"arno" <ar***********@ yahoo.fr> wrote in message
news:de******** **@s1.news.olea ne.net... Hello,
With a datagrid (asp.net 2), how do I do to have a query's total. When I use GridView1.rows. count, I had the total for a page but not for all pages. (I don't wish to use a second query : "select count(*) from ...)"
Thanks by advance
arno
"Grant Merwitz" <gr***@workshar e.com> a écrit dans le message de news: e7************* *@tk2msftngp13. phx.gbl... Not certain about in 2.0
But you could either check in the datasource your binding to the drig
so if: GridView1.DataS ource = MyDataTable;
you could check MyDataTable.Row s.Count
Alternately, the other way you could take it out of the datasource
int MyCount = ((DataTable)Gri dView1.DataSour ce).Rows.Count; or int MyCount = ((DataSet)GridV iew1.DataSource ).Tables[0].Rows.Count;
HTH
"arno" <ar***********@ yahoo.fr> wrote in message news:de******** **@s1.news.olea ne.net... Hello,
With a datagrid (asp.net 2), how do I do to have a query's total. When I use GridView1.rows. count, I had the total for a page but not for all pages. (I don't wish to use a second query : "select count(*) from ...)"
Thanks by advance
arno
It isn't ok in asp.net 2.
have you an another solution ? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sam |
last post by:
Hello Group,
Havent had luck posting it to
microsoft.public.dotnet.framework.aspnet.datagridcontrol group. Excuse
me for the cross posting.
I have a datagrid which needs to be split into multiple
pages when printing along with headers on every page. I came up with
this routine below which adds 2 rows - one with datagrid headers and
the other is also a headers which consists other related information.
The 2 rows(headers) needs to be...
|
by: Oliver Hopton |
last post by:
Hello,
I'm trying to write a PageableCollection class which implements paging for
me so I don't need to rely on the paging provided by the DataGrid as that
generates huge viewstate when bound to a collection with a lot of items.
The code below works fine when I use foreach to iterate over it but when I
bind the Datagrid to an instance of this class I get the whole collection
displayed in the grid! Does the Datagrid not use...
|
by: Bill C. |
last post by:
Hello,
I know this has been discussed a lot already because I've been searching
around for information the last few weeks.
I'm trying to implement a DataGridComboBoxColumn class. I've found
several examples on the web. They all seem to have problems, though
that I've been unable to resolve.
The most promising example I have found is at:
|
by: pei_world |
last post by:
I want to implement a key hit with enter to dropdown a combobox that is in
the datagrid. in this case I need to override its original behaviours. I
found some codes from the web. Does anyone know how to use this code? please
help!
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20862953.html
|
by: Alpha |
last post by:
I have a window application. In one of the form, a datagrid has a dataview
as its datasource. Initial filtering result would give the datavew 3 items.
When I double click on the datagrid to edit the selected lie item at which
case I would pop up a separate dialog box to do so, in the debugging code,
the dataview.count would return 0. I get a error message because I tried to
get values out of a dataview that holds 0 items. Does anyone...
| |
by: CSL |
last post by:
I am using the DataGrid in a Windows Application, how can
I adjust the widths of each column individually.
|
by: skOOb33 |
last post by:
I successfully autosized the columns and rows on my Datagrid, and am
now facing another issue. Having the sorting ability by clicking the
column headers is key, but when I do that, it resizes all my rows back
to their defaults. I populate the datagrid, resize it accordingly and
it works fine...just when I click the headers is when it messes up. It
would be fine if I could run my autosizing again after the sorting is
done since there...
|
by: Brock |
last post by:
First note that I am using Framework 1.1. I have an .aspx page that is
displaying a list of employees, but only the Employee Number, First
Name, Last Name, and Title. It is working great. I recessed it in a
<Div></Divto allow scrolling of just the data, not the page. What I
need to do is place a DataList (also in a <Div></Divto allow
scrolling of just the data) to the right of the Datagrid to show 40
Employee Detail fields (listed top to...
|
by: Brock |
last post by:
Thanks in advance... (you can see a screenshot of what my form looks
like currently at http://www.juggernautical.com/DataGrid.jpg - the
Datalist is super-imposed in 'design view' but the DataGrid is the
actual running of the page) I've almost got this working (?) but need
a little help. I have an .aspx page that has a DataGrid listing
employees with a "Select" button that is to be used to populate the
DataList to the right of the DataGrid...
|
by: Brock |
last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The
reason for this is that I want the user to be able to change values
without updating the database, but still have their report reflect the
values they anticipate committing to see hypothetical totals of
columns from a set of records. These records are displaying properly
on my DataGrid but I'm not sure how to get Crystal Reports 10 to use
as its datasource the dataset...
|
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...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |