1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Paging.aspx.cs" Inherits="C1GridView_Paging" %>
<%@ Register Assembly="C1.Web.UI.Controls.2" Namespace="C1.Web.UI.Controls.C1GridView"
TagPrefix="C1GridView" %>
<%@ Register Assembly="C1.Web.UI.Controls.2" Namespace="C1.Web.UI.Controls.C1Input"
TagPrefix="C1Input" %>
<asp:Content ID="Content1" ContentPlaceHolderID="DescriptionPlaceHolder1" runat="Server">
The C1GridView control provides built-in data paging functionality without requiring any coding. By default the grid is displayed in one continuous window. If you choose, you can display the grid on multiple pages. If paging is set to True, end-users can navigate each page of the grid through buttons or links at the top or bottom of the grid.
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<C1GridView:C1GridView ID="C1GridView1" runat="server" Width="100%" DataSourceID="SqlDataSource1"
AutoGenerateColumns="True" AllowPaging="true" PageSize="15" UseEmbeddedVisualStyles="True"
VisualStyle="Office2007Blue">
<RowHeader Visible="True">
</RowHeader>
</C1GridView:C1GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\C1GridViewDemo.mdb;Persist Security Info=True"
ProviderName="System.Data.OleDb" SelectCommand="SELECT ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM Products">
</asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ControlOptionsHolder1" runat="Server">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<fieldset>
<legend>Select Paging Mode</legend>
<div class="controloptionscontainer radio">
<asp:RadioButtonList ID="RblMode" runat="server" Height="12px" AutoPostBack="True"
RepeatDirection="Horizontal" OnSelectedIndexChanged="RblMode_SelectedIndexChanged">
<asp:ListItem Value="Numeric" Selected="True">Numeric</asp:ListItem>
<asp:ListItem Value="NumericFirstLast">Numeric (First & Last)</asp:ListItem>
<asp:ListItem Value="NextPrevious">Next/Previous</asp:ListItem>
<asp:ListItem Value="NextPreviousFirstLast">Next/Previous (First & Last)</asp:ListItem>
</asp:RadioButtonList>
</div>
</fieldset>
<fieldset>
<legend>Select Position</legend>
<div class="controloptionscontainer radio">
<asp:RadioButtonList ID="RblPosition" runat="server" Height="12px" AutoPostBack="True"
RepeatDirection="Horizontal" OnSelectedIndexChanged="RblPosition_SelectedIndexChanged">
<asp:ListItem Value="Top">Top</asp:ListItem>
<asp:ListItem Value="Bottom" Selected="True">Bottom</asp:ListItem>
<asp:ListItem Value="TopAndBottom">Top and Bottom</asp:ListItem>
</asp:RadioButtonList>
</div>
</fieldset>
<fieldset>
<legend>Set Page Size </legend>
<div class="controloptionscontainer radio">
<asp:TextBox ID="TxtPageSize" runat="server" Text="5"></asp:TextBox>
</div>
</fieldset>
<a href="#" id="c1apply">
<asp:Button runat="server" ID="btnApply" CssClass="apply" Text="Apply" UseSubmitBehavior="false" OnClick="btnApply_Click" />
</a>
<div id="c1applycontainer" class="applied">
Settings Applied!
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
|