I need to get the total number of items/records returned into GridView.
If I just do myGridView.Rows.Count, then it just returns me the total number
of items on the page.
But if I have, 10 pages (10 records per page) and 98 records total,
Rows.Count will return me 10 on the first 9 pages, and 8, on the last page.
But, I need to somehow get access to total record count which is 98. What
is the proper/easy way to accomplish that?
Thanks, 3 16392
You need to use the ReturnValue of the ObjectDataSourceStatusEventArgs or
SqlDataSourceStatusEventArgs while handling the datasource's Selected event.
Look at this sample for the code: http://www.webswapp.com/codesamples/...w/default.aspx
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"Amelyan" wrote: I need to get the total number of items/records returned into GridView.
If I just do myGridView.Rows.Count, then it just returns me the total number of items on the page.
But if I have, 10 pages (10 records per page) and 98 records total, Rows.Count will return me 10 on the first 9 pages, and 8, on the last page.
But, I need to somehow get access to total record count which is 98. What is the proper/easy way to accomplish that?
Thanks,
Phillip!
Thank you,
I have been looking for the Nested GridView sample (same web site, not the
page you give) for a few weeks now.
I didn't bookmark it, and figured I'd find it later.
Too much info on the internet sometimes.
...
"Phillip Williams" <WE******@newsgroups.nospam> wrote in message
news:EE**********************************@microsof t.com... You need to use the ReturnValue of the ObjectDataSourceStatusEventArgs or SqlDataSourceStatusEventArgs while handling the datasource's Selected
event. Look at this sample for the code: http://www.webswapp.com/codesamples/...w/default.aspx -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Amelyan" wrote:
I need to get the total number of items/records returned into GridView.
If I just do myGridView.Rows.Count, then it just returns me the total
number of items on the page.
But if I have, 10 pages (10 records per page) and 98 records total, Rows.Count will return me 10 on the first 9 pages, and 8, on the last
page. But, I need to somehow get access to total record count which is 98.
What is the proper/easy way to accomplish that?
Thanks,
You are welcome.
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"sloan" wrote: Phillip!
Thank you,
I have been looking for the Nested GridView sample (same web site, not the page you give) for a few weeks now.
I didn't bookmark it, and figured I'd find it later.
Too much info on the internet sometimes.
... "Phillip Williams" <WE******@newsgroups.nospam> wrote in message news:EE**********************************@microsof t.com... You need to use the ReturnValue of the ObjectDataSourceStatusEventArgs or SqlDataSourceStatusEventArgs while handling the datasource's Selected event. Look at this sample for the code: http://www.webswapp.com/codesamples/...w/default.aspx -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Amelyan" wrote:
I need to get the total number of items/records returned into GridView.
If I just do myGridView.Rows.Count, then it just returns me the total number of items on the page.
But if I have, 10 pages (10 records per page) and 98 records total, Rows.Count will return me 10 on the first 9 pages, and 8, on the last page. But, I need to somehow get access to total record count which is 98. What is the proper/easy way to accomplish that?
Thanks,
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: news.microsoft.com |
last post by:
I've looked in the help and at each of the properties for the grid view, but
can't seem to find what I need.
I have allowpaging set to true for my gridview and when the page loads I go
and fetch...
|
by: Dick |
last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls
GridView.DataBind. I want the row that is selected before the DataBind to
still be selected afterwards.
This happens...
|
by: NH |
last post by:
I have a girdview with paging enabled. How can I add a message in the footer
to say "Viewing records 1-15 of 45" etc
Thanks
|
by: msch-prv |
last post by:
Hi, I have a paged gridview (Apts_grd) tied to an Access DataSource
(Apts_srcGrd). How do I get the total number of data records returned
by the query?
The following shows only the number of...
|
by: Greg Lyles |
last post by:
Hi all,
I'm trying to develop an ASP.NET 2.0 website and am running into some
real problems with what I thought would be a relatively simple thing
to do.
In a nutshell, I'm stuck on trying to...
|
by: Blasting Cap |
last post by:
I've got a gridview (that I converted over from a datagrid, which had
been working properly), that is doubling up the number of rows returned.
When it was running as a datagrid, the same code sent...
|
by: cmrhema |
last post by:
hello
I am using a gridview to display records.
I have set page index for the grid.
I have populated the gridview.
After every 10 records I will move to the next page.
All these works fine.
...
|
by: HariKutty |
last post by:
Hi!
I am using ASP.NET with VB.In my application,i am using a gridview..My total records in the Database is 50.I am getting values from the database by passing some of the parameters .My O/P...
|
by: =?Utf-8?B?V2FubmFiZQ==?= |
last post by:
Is there a way to use a gridview in a timecard application, and if so, how? I
was looking at using a gridview to display a person's hours worked in a
week. To do this, many different data records...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |