Kỹ thuật phân trang trong GridView - Pdf 14

Kỹ thuật phân trang trong GridView
để Paging trong GridView thì phải có các điều kiện sau:

trong code aspx:

<asp:GridView ID="GridView1" AllowPaging="true" PageSize="10"

PageSize là số lượng bản ghi trên 1 trong của GridView
AllowPaging là cho phép GridView phân trang

mở Design click chuột trái vào GridView > chọn Properties
Generated by Foxit PDF Creator © Foxit Software
For evaluation only.Click chuột đúp sự kiện PageIndexChanging

nó sẽ Gen ra trong code behind thế này

Viết tiếp 1 hàm Bind dữ liệu từ Database lên GridView

Generated by Foxit PDF Creator © Foxit Software
For evaluation only.

ID="ScriptManager1"

runat="server">

</asp:ScriptManager><asp:UpdateProgress

ID="UpdateProgress1"

runat="server">

<ProgressTemplate>

<p>Loading</p>

</ProgressTemplate>

</asp:UpdateProgress><asp:UpdatePanel

ID="UpdatePanel1"

runat="server">

<ContentTemplate>


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status