LISTING DataGrid Declaration aspx

1: <%@ Page language="c#" Debug="true" Codebehind="WebForm1.pas"

2: AutoEventWireup="false" Inherits="WebForm1.TWebForm1" %>

3: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 4:

8: <meta name="GENERATOR" content="Borland Package Library 7.1">

11: <body ms_positioning="GridLayout">

12: <form runat="server">

13: <asp:datagrid id=DataGrid1

14: style="Z-INDEX: 1; LEFT: 6px; POSITION: absolute; TOP: 6px"

15: runat="server" height="243" width="523px" font-names="Arial"

16: font-size="X-Small" borderwidth="1px" bordercolor="Gray"

17: borderstyle="Solid" cellspacing="2" cellpadding="2"

18: pagesize="5" allowpaging="True">

19: <alternatingitemstyle borderstyle="Solid" backcolor="#FFFFC0">

20: </alternatingitemstyle>

21: <itemstyle borderstyle="Solid" backcolor="#C0FFFF">

. Find the code on the CD: \Code\Chapter 27\Exi3.

Line 18 shows the setting of the two attributes that enable paging within the DataGrid. Lines 19 and 20 set the AiternateitemStyle and line 21 sets the Itemstyle attribute. The code-behind source for this Page is shown in Listing 27.12.

0 0

Post a comment

  • Receive news updates via email from this site