Saturday, March 24, 2012

Paging Sample

Hi there. Here there is an absolute newbie to Ajax. I'm looking for an Ajax sample for gridview/datagrid paging. Where can i find a -closed- sample?

Thanks in advance.

There is no difference to implement asp:GridView paging?between?
<asp:UpdatePanel ID="pnlGuestbook" runat="server">
<asp:GridView ID="gvGuestBook" Width="250" CssClass="NotifyTable" DataSourceID="SqlDataSource2" PageSize="2" AllowPaging="True" runat="server" AutoGenerateColumns="False" DataKeyNames="Message_ID">
<td><br />
<asp:CommandField ButtonType="Button" >
<ItemStyle VerticalAlign="Top" />
<PagerSettings Mode="NumericFirstLast" FirstPageText="First" NextPageText="Next" LastPageText="Last" />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ProductConnectionString %>"
SelectCommand="SELECT [Message_ID], [From], [Subject], [DateSent] FROM [Message]">
<asp:AsyncPostBackTrigger ControlID="gvGuestBook" EventName="PageIndexChanged"></asp:AsyncPostBackTrigger>
Wish this can help you.
Thank you. It was so simple. Just drag and drop two controls (ScriptManager and UpdatePanel) and put GridView in UpdatePanel. Love it. =)

No comments:

Post a Comment