This documentation is archived and is not being maintained.

DataGridColumn::HeaderImageUrl Property

Gets or sets the location of an image to display in the header section of the column.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
virtual property String^ HeaderImageUrl {
	String^ get ();
	void set (String^ value);
}

Property Value

Type: System::String
The location of an image to display in the header section of the column. The default value is String::Empty.

Use the HeaderImageUrl property to specify the URL of an image to display in the header section of the column. You can use a relative or an absolute URL. A relative URL relates the location of the image to the location of the Web page without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the image in code. An absolute URL provides the complete path, so moving the site to another directory requires updating the code.

NoteNote

If you want to display text instead of an image in the header section of the column, set the HeaderText property instead of this property.

The following code example demonstrates how to use the HeaderImageUrl property to specify the image displayed in the header section of the column.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: