|
| カテゴリー順サンプル(降順) |
|
|
ListViewのヘッダー/フッターを固定する(CSS版 v2) #178
|
このサンプルは、スタイルシート(CSS)を使用して
ListViewのヘッダー/フッターを固定します。
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
<LayoutTemplate>
<table class="tableone" summary="summary">
<caption>得意先リスト</caption>
<thead>
<tr>
<th class="th1" scope="col">Customer Name</th>
<th class="th2" scope="col">Customer ID</th>
<th class="th3" scope="col">Contact Name</th>
<th class="th4" scope="col">Contact Title</th>
<th class="th5" scope="col">Phone</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5">ノースウィンド</td>
</tr>
</tfoot>
<tbody>
<tr>
<td colspan="5">
<div class="inner">
<table class="tabletwo">
<tr id="ItemPlaceHolder" runat="server"></tr>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<th class="td1" scope="row"><%#Eval("CompanyName")%></th>
<td class="td2"><%#Eval("CustomerID")%></td>
<td class="td3"><%#Eval("ContactName")%></td>
<td class="td4"><%#Eval("ContactTitle")%></td>
<td class="td5"><%#Eval("Phone")%></td>
</tr>
</ItemTemplate>
</asp:ListView>
|
|
|