L
Lynn
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
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