Click or drag to resize
KaxTimeViewAlternatingTimeTemplate Property
Gets or sets the template for alternating time cells in the KaxTimeView.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public ITemplate AlternatingTimeTemplate { get; set; }

Property Value

Type: ITemplate
Remarks

Use the AlternatingTimeTemplate property to control the contents of alternating items in the KaxTimeView control. The appearance of alternating time cells is controlled by the AlternatingTimeStyle property.

To specify a template for the alternating time cells, place the <AlternatingTimeTemplate> tags between the opening and closing tags of the KaxTimeView control. You can then list the contents of the template between the opening and closing <AlternatingTimeTemplate> tags.

Examples

The following code example demonstrates how to use the AlternatingTimeTemplate property to control the contents of alternating items in the KaxTimeView control.

[New Example]
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="KaxCalendar.Net2" Namespace="Kettic.AspNetControls" TagPrefix="kaxCln" %>

<!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">
    <div>
        <kaxCln:KaxTimePicker
            ID="KaxTimePicker1"
            runat="server">
            <TimeView>
                <AlternatingTimeTemplate>
                    <input type="button" id="button1" value='<%# DataBinder.Eval(((DataListItem)Container).DataItem, "time", "{0:t}") %>' />
                </AlternatingTimeTemplate>
            </TimeView>
        </kaxCln:KaxTimePicker>
    </div>
    </form>
</body>
</html>
See Also