473,320 Members | 2,048 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,320 software developers and data experts.

records counting for gridview

maliksleo
115 100+
hi to all

i want to show some thing like this above my gridview.

"Showing 1 to 10 records of 14" my page size is 10 and total records are dynamic

how i can do this?

maliksleo
Apr 16 '09 #1
2 1906
iam_clint
1,208 Expert 1GB
@maliksleo
If you are using a dataset you can use dataset.tables(index).rows.count
to get 1 to 10 you need to make a custom function that will take the page size and current page

1 to 10 = page 1
11 to 20 = page 2

so math is
Expand|Select|Wrap|Line Numbers
  1. start = (page-1)*pagesize+1
  2. end = page*pagesize
  3. if end>totalrecords then
  4.   end = totalrecords
  5. end if
  6.  
Apr 16 '09 #2
maliksleo
115 100+
thanks alot for helping me thanks

maliksleo
Apr 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: P | last post by:
Hello, I am having a difficult time updating a record via a stored procedure using the gridview and sqldatasource. I cannot seem to be able to find a way to set everything up so that I can pass...
2
by: Marlon Brown | last post by:
Hello, I am able to "edit" and "update" records using Gridview and Data Sources. However I don't see an option to "insert" records. Can someone tell me what's the procedure to "insert"...
1
by: Marc | last post by:
Hi, I made a detailsview for inserting records. I also made a gridview for editing and deleting the same records. The keyfield is an autonumbering field in Access (pcnr). My problem is: I can...
3
by: dbarker1 | last post by:
Hello All, I am developing a web front end using the standard datagrid in the 1.1 framework. Currently it allows users to navigate through records 20 at a time via previous and next buttons. ...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
3
by: Ronald S. Cook | last post by:
I was told that if calling lots of records from the database (let's say 100,000), that the GridView's paging feature would automatically "handle" everything. But the 100,000 records are still...
4
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. ...
4
by: ITCraze | last post by:
Hello everyone, I have a Gridview , whose first column is template colums which contains checkboxes , outside my GridView I a have a delete button. So in this application,when the user check...
1
by: Fabio Mastria | last post by:
Hi having a DataTable with 15 records, used as DataSource of a GridView enabled to manage page of 10 rows, if I click on the second page, I can't see the next records after firsts 10! I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
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...
1
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)...
0
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...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
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...

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.