KaxDateTimePickerItemDataBound Event |
Namespace: Kettic.AspNet.Controls
The ItemDataBound event is raised after an item is data bound to the KaxTimeView control. This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is no longer available.
[AspNet]
<%@ 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
OnItemDataBound=
"KaxTimePicker1_ItemDataBound"
ID="KaxTimePicker1"
runat="server">
</kaxCln:KaxTimePicker>
</div>
</form>
</body>
</html>
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class _Default : System.Web.UI.Page { protected void KaxTimePicker1_ItemDataBound(object sender, Kettic.AspNetControls.Base.Calendar.Events.TimePickerEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Controls.Add(new LiteralControl("AlternatingItem")); } } }