I am trying to do something similar to the RadToolTip for RadCalendar demo shown here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultvb.aspx. I want to add an export button inside the UserControl for the tooltip, but can't seem to get that event to fire. My code for the user control is below. Any ideas?
Partial
Class
CalendarEventDetails
Inherits
System.Web.UI.UserControl
Private
dtSelectedDate
As
DateTime
Public
Property
SelectedDate()
As
DateTime
Get
Return
dtSelectedDate
End
Get
Set
(
ByVal
value
As
DateTime)
dtSelectedDate = value
End
Set
End
Property
Protected
Sub
Page_Init(sender
As
Object
, e
As
EventArgs)
Handles
Me
.Init
AddHandler
lvEvents.ItemCommand,
AddressOf
lvEvents_ItemCommand
End
Sub
Protected
Sub
Page_Load(sender
As
Object
, e
As
EventArgs)
Handles
Me
.Load
odsEvents.SelectParameters(
"StartDate"
).DefaultValue = SelectedDate
odsEvents.SelectParameters(
"EndDate"
).DefaultValue = SelectedDate
lvEvents.DataBind()
End
Sub
Protected
Sub
lvEvents_ItemCommand(sender
As
Object
, e
As
ListViewCommandEventArgs)
If
e.CommandName =
"Export"
Then
'Do Something
End
If
End
Sub
End
Class
<%@ Control Language="VB" AutoEventWireup="true" CodeFile="EventDetails.ascx.vb" Inherits="CalendarEventDetails" %>
<
asp:ListView
runat
=
"server"
ID
=
"lvEvents"
DataSourceID
=
"odsEvents"
>
<
LayoutTemplate
>
<
div
style
=
"max-height: 250px; overflow-y: auto"
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"itemPlaceHolder"
></
asp:PlaceHolder
>
</
div
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblStartDate"
Text='<%#Eval("StartDate")%>' Visible="false"></
asp:Label
>
<
asp:Label
runat
=
"server"
ID
=
"lblEndDate"
Text='<%#Eval("EndDate")%>' Visible="false"></
asp:Label
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Category</
b
><
br
/>
<%#Eval("Category")%>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Title</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblTitle"
Text='<%#Eval("Title")%>'></
asp:Label
>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Time</
b
><
br
/>
<%#Eval("StartDate", "{0:hh:mm tt}")%> to <%#Eval("EndDate", "{0:hh:mm tt}")%>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Location</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblLocation"
Text='<%#Eval("Location")%>'></
asp:Label
>
</
div
>
<
div
style
=
"margin-bottom: 5px"
>
<
b
>Description</
b
><
br
/>
<
asp:Label
runat
=
"server"
ID
=
"lblDescription"
Text='<%#Eval("Description")%>'></
asp:Label
>
</
div
>
<
div
>
<
des:LinkButton
runat
=
"server"
ID
=
"btnExport"
Text
=
"Export"
CommandName
=
"Export"
></
des:LinkButton
>
</
div
>
</
ItemTemplate
>
<
ItemSeparatorTemplate
>
<
hr
/>
</
ItemSeparatorTemplate
>
</
asp:ListView
>
<
asp:ObjectDataSource
ID
=
"odsEvents"
runat
=
"server"
DataObjectTypeName
=
"CalendarEvent"
TypeName
=
"CalendarManager"
SelectMethod
=
"GetEventList"
>
<
SelectParameters
>
<
asp:Parameter
Name
=
"CalendarId"
Type
=
"Int32"
DefaultValue
=
"101"
/>
<
asp:Parameter
Name
=
"StartDate"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"EndDate"
Type
=
"DateTime"
/>
<
asp:Parameter
Name
=
"CategoryId"
Type
=
"Int32"
/>
</
SelectParameters
>
</
asp:ObjectDataSource
>