473,322 Members | 1,405 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,322 software developers and data experts.

Datagrid paging using dates?

Hello,

I have a datagrid setup, and I have the records in the datagrid displayed by
a date range.

I would like to use some custom paging, but am unsure of how to get this to
work when the items are sorted by date.

Her is my SQL statement that is sued to populate my datagrid:
SELECT EventID, sEventName, dtEventDate, iEventType, sCity, sState,
sWebSite, iApproved FROM tEventCalendar WHERE dtEventDate >= " &
DateTime.Now.ToOADate & " ORDER BY dtEventDate ASC, sEventName ASC",
connString
<<

I started by using this:

SELECT EventID, sEventName, dtEventDate, iEventType, sCity, sState,
sWebSite, iApproved FROM tEventCalendar WHERE EventID BETWEEN " & i & " AND
" & i + dgEvents.PageSize & " AND dtEventDate >= " & DateTime.Now.ToOADate &
" ORDER BY dtEventDate ASC, sEventName ASC", connString
<<
but realized that this is sorting by i, which is my EventID. This is not
working.

Would I be paging using the date, or using something else?

I am new to this, and, well, confused.

Thanks for the help,

Lynn
Nov 19 '05 #1
0 974

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

Similar topics

3
by: Joseph D. DeJohn | last post by:
I am trying to get pagination working on a datagrid. Can anyone point me to a resource for help on this? I'm not sure if custom paging is the best option or not.
2
by: Dave | last post by:
Hi, When binding a dataset to a DataGrid and paging 10 records at a time, is the entire dataset still encoded and sent to viewstate as well OR just the current page and what's visible to the...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
0
by: Raed Sawalha | last post by:
I have aspx page with user control , in the user control i have DataGrid with custom paging the grid is displaying contents of datatable as following schema <xs:element name="id"...
2
by: Axel Dahmen | last post by:
Hi, I'm using a DataGrid control to show a table's content with paging. For navigation through the pages I'm using the DataGrid's intrinsic navigation section. My problem: The DataGrid...
0
by: Lynn | last post by:
Hello, I have a datagrid setup, and I have the records in the datagrid displayed by a date range. I would like to use some custom paging, but am unsure of how to get this to work when the...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
0
by: Pat | last post by:
I have 3 Datagrid nested. Master Details Child The master has paging (And i'm using the paging inbuilt in the Datagrid) in the Master DataGrid you select a linkbutton(using commandname) and it...
3
by: Pat | last post by:
I have a 2 nested Datagrid. When i select a row in the Master Datagrid i populate the Child databrid using myDataGrid.SelectedIndex value as the filter and setting the DataKeyField. I enabled...
1
by: gellert | last post by:
Hello guys, I have a Datagrid and .AllowPaging=true.... it is working well but I'd like to page automatically after some seconds. So the whole solution is a screen in our company showing some...
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...
0
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...
1
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...
1
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.