Click here to Skip to main content
12,625,991 members (23,831 online)
Click here to Skip to main content

Stats

76.8K views
2.2K downloads
49 bookmarked
Posted

Advanced Paging GridView with ASP.NET 2.0/3.5

, 7 Nov 2008 CPOL
Advanced paging GridView with ASP.NET 2.0/3.5
WizardGridView
Demo
App_Data
Bin
WizardGridView.dll
WizardGridView.pdb
WizardGridView
bin
Debug
WizardGridView.dll
Properties
Resources
WizardGridView.bmp
WizardGridView.suo
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="WizardGridView" Namespace="WizardGridView" TagPrefix="Wizard" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>未命名頁面</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <Wizard:WizardGridView ID="WizardGridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1"
            WizardCustomPager="True">
            <Columns>
                <asp:BoundField DataField="OrderID" HeaderText="OrderID" InsertVisible="False" ReadOnly="True"
                    SortExpression="OrderID" />
                <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID" />
                <asp:BoundField DataField="OrderDate" HeaderText="OrderDate" SortExpression="OrderDate" />
                <asp:BoundField DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName" />
                <asp:BoundField DataField="ShipCity" HeaderText="ShipCity" SortExpression="ShipCity" />
            </Columns>
        </Wizard:WizardGridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnString_SqlClient %>"
            SelectCommand="SELECT [OrderID], [CustomerID], [OrderDate], [ShipName], [ShipCity] FROM [Orders]">
        </asp:SqlDataSource>
        
    </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

WizardWu
Software Developer (Senior)
Taiwan Taiwan
A young programmer in Taipei City, Taiwan. Earn little money and just coding for fun.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161205.3 | Last Updated 7 Nov 2008
Article Copyright 2008 by WizardWu
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid