GridView.ShowHeader プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As GridView Dim value As Boolean value = instance.ShowHeader instance.ShowHeader = value
/** @property */ public boolean get_ShowHeader () /** @property */ public void set_ShowHeader (boolean value)
ヘッダー行を表示する場合は true。それ以外の場合は false。既定値は true です。


ShowHeader プロパティを使用して、GridView コントロールにヘッダー行を表示する方法を次のコード例に示します。
<%@ Page language="VB" %> <html> <body> <form runat="server"> <h3>GridView ShowHeader and ShowFooter Example</h3> <asp:gridview id="CustomersGridView" datasourceid="CustomersSource" autogeneratecolumns="true" emptydatatext="No data available." showheader="true" showfooter="true" runat="server"> <headerstyle backcolor="LightCyan" forecolor="MediumBlue"/> <footerstyle backcolor="LightCyan" forecolor="MediumBlue"/> </asp:gridview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:sqldatasource id="CustomersSource" selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"/> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form runat="server"> <h3>GridView ShowHeader and ShowFooter Example</h3> <asp:gridview id="CustomersGridView" datasourceid="CustomersSource" autogeneratecolumns="true" emptydatatext="No data available." showheader="true" showfooter="true" runat="server"> <headerstyle backcolor="LightCyan" forecolor="MediumBlue"/> <footerstyle backcolor="LightCyan" forecolor="MediumBlue"/> </asp:gridview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:sqldatasource id="CustomersSource" selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"/> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGridView.ShowHeader プロパティを検索する場合は、下記のリンクをクリックしてください。

- GridView.ShowHeader プロパティのページへのリンク