Re: Disappearing GridView - Newsgroup???
- From: "marss" <marss.ua@xxxxxxxxx>
- Date: 16 Apr 2007 07:38:11 -0700
Don Miller wrote:
So, how can you use GridView with callback paging without postbacks? What's
missing from the code and why shouldn't the code work? And where is the
documentation for avoiding this problem?
Hi,
The GridView disappers because it is empty. If you want to use a
callback to change the page set GridView's datasource in the page load
event handler. You don't need to process PageIndexChanging event, it
is not raised.
<asp:GridView ID="AuthorsGridView" runat="server" AllowPaging="True"
EnableSortingAndPagingCallbacks="True" PageSize="3">
......
</asp:GridView>
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
bindDataToGridView()
End If
If Not IsCallback Then
......
AuthorsGridView.DataSource = ds
'AuthorsGridView.DataBind() Don't bind here!
End If
End Sub
Regards
.
- Follow-Ups:
- Re: Disappearing GridView - Newsgroup???
- From: Don Miller
- Re: Disappearing GridView - Newsgroup???
- References:
- Disappearing GridView - Newsgroup???
- From: Don Miller
- Disappearing GridView - Newsgroup???
- Prev by Date: Re: Cross page postback
- Next by Date: lesbian gallery sexy
- Previous by thread: Disappearing GridView - Newsgroup???
- Next by thread: Re: Disappearing GridView - Newsgroup???
- Index(es):
Relevant Pages
|