G
Guest
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 dbNT_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 dbNT_LDAP_LOG
WHERE (EntryType = 'Error')"
MultiView1.SetActiveView(View1)
End Sub
The default SelectQuery is: SELECT * FROM dbNT_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?
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 dbNT_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 dbNT_LDAP_LOG
WHERE (EntryType = 'Error')"
MultiView1.SetActiveView(View1)
End Sub
The default SelectQuery is: SELECT * FROM dbNT_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?