ASPxTitleIndex.IndexPanelItemTemplate Property
Gets or sets a template used for displaying the content of all index panel items within the ASPxTitleIndex control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
ITemplate | null | An object that implements the ITemplate interface and contains the template to display the content of all index panel items within the control. |
Remarks
Note
Once a template defined via the IndexPanelItemTemplate property is created within a control, it is instantiated within a container object of the IndexPanelItemTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.
Example
This example demonstrates how to customize ASPxTitleIndex's IndexPanel by using the IndexPanelItemTemplate.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxTitleIndex"
TagPrefix="dxti" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<dxti:ASPxTitleIndex ID="ASPxTitleIndex1" runat="server" DataSourceID="AccessDataSource1"
GroupingField="Genre" TextField="Name" Width="524px">
<IndexPanelItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Container.GroupValue.ToString() %>'
Font-Size='<%# FontUnit.Point(Container.GroupItemCount + 5) %>'
NavigateUrl='<%# Container.NavigateUrl %>'>
</asp:HyperLink>
</IndexPanelItemTemplate>
<Columns>
<dxti:Column>
</dxti:Column>
<dxti:Column>
</dxti:Column>
</Columns>
</dxti:ASPxTitleIndex>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Data.mdb"
SelectCommand="SELECT * FROM [Films]"></asp:AccessDataSource>
</form>
</body>
</html>
<dxti:ASPxTitleIndex ID="ASPxTitleIndex1" runat="server"
DataSourceID="AccessDataSource1" GroupingField="Genre" TextField="Name"
Width="524px">
<IndexPanelItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
Text='<%# Container.GroupValue.ToString() %>'
Font-Size='<%# FontUnit.Point(Container.GroupItemCount + 5) %>'
NavigateUrl='<%# Container.NavigateUrl %>'>
</asp:HyperLink>
</IndexPanelItemTemplate>
<Columns>
<dxti:Column>
</dxti:Column>
<dxti:Column>
</dxti:Column>
</Columns>
</dxti:ASPxTitleIndex>
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/App_Data/Data.mdb"
SelectCommand="SELECT * FROM [Films]"></asp:AccessDataSource>