|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CountryView.aspx.cs" Inherits="SortingAndPaging.CountryView" %>
<!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>Sorting And Paging</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView runat="server" ID="gridCountry" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" EmptyDataText="No Data Found" PageSize="5" OnPageIndexChanging="gridCountry_PageIndexChanging"
OnRowCreated="gridCountry_RowCreated" OnSorting="gridCountry_Sorting" BorderColor="#404040" BorderWidth="1px" BorderStyle="Solid" ForeColor="#404040">
<Columns>
<asp:TemplateField HeaderText="Int:Country ID" SortExpression="CountryID">
<ItemTemplate>
<%#Eval("CountryID")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="String:Country Name" SortExpression="CountryName">
<ItemTemplate>
<%#Eval("CountryName")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nullable Int:Country Trade Code" SortExpression="CountryTradeCode">
<ItemTemplate>
<%#Eval("CountryTradeCode")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle BackColor="DarkOrange" Font-Bold="True" ForeColor="White" BorderColor="DarkGray" BorderStyle="Solid" Font-Names="Arial Unicode MS" Font-Size="Small" />
<RowStyle BorderColor="#404040" BorderStyle="Solid" Font-Names="Trebuchet MS" Font-Size="Small" />
<AlternatingRowStyle BackColor="Bisque" BorderColor="#404040" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Trebuchet MS" Font-Size="Small" />
</asp:GridView>
</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.