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

MultiView and GridView Paging issue

I have a MultiView with two views in it. View1 has a GridView and a
SqlDataSource. View2 has a few link buttons that set the SelectCommand
for the SqlDataSource to show a few reports. Here's the extremely
basic code sample:

Protected Sub btnAll_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnAll.Click
SqlDataSource1.SelectCommand = "SELECT * FROM dbo.ONT_LDAP_LOG"
MultiView1.SetActiveView(View1)
End Sub

Protected Sub btnErrors_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnErrors.Click
SqlDataSource1.SelectCommand = "SELECT * FROM dbo.ONT_LDAP_LOG
WHERE (EntryType = 'Error')"
MultiView1.SetActiveView(View1)
End Sub
The default SelectQuery is: SELECT * FROM dbo.ONT_LDAP_LOG WHERE
(EntryType = 'Error')"

My GridView is paged at 40 records per page. If I click on the link
button to show all records, the GridView populates perfectly with all
of the data(as do all link buttons). However, as soon as I click on
the next page, the GridView shows the data from the Error select
statement. If I remove the default SelectQuery, the GridView states
that 'There are no data records to display.'

ViewState is enabled on everything. Any ideas or suggestions?

Sep 8 '06 #1
1 2115
This is ASP 2.0

Sep 8 '06 #2

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

Similar topics

0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
1
by: DougS | last post by:
We're writing a small survey app in ASP.Net 2.0. We're dynamically adding Views to a MultiView control for each question stored in a database. We are considering displaying three to five questions...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
1
by: idan | last post by:
Here's my data: (Table: EmployeePlan) EmpID Plan Status abc123 PlanA A abc123 PlanB D abc123 PlanC A xyz789 PlanA D xyz789 PlanB D xyz789 PlanC...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.