Hi, I have a RadCalendar (ajax q2) that I am assigning different event descriptions via the Dayrender Event as shown below. The goal is to show a RadWindow that receives the EventID of the clicked day (eventID being something unique in our system). I have tried to do this by adding a .Attributes.Add onclick along with associated javascript as shown below. However, what happens when I click an Event is that the window initially opens but then closes after postback. All I want is for the window to stay open after postback. Any thoughts on how to achieve this? Many thanks.
// Javascript function (assumes rwm is a radwindow manager on page
function launchAgenda(EventID)
{
var oWnd = $find("<%= rwmAgenda.ClientID %>");
oWnd.show();
oWnd.setSize(900,700);
oWnd.moveTo(10,10);
oWnd.setUrl("Faculty/Agenda.aspx?EID=" + EventID);
}
</script>
' Visual Basic DayRender sub
Public Sub CustomizeDay(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles RadCalendar1.DayRender
Dim CurrentDate As DateTime = e.Day.Date
Dim currentCell As TableCell = e.Cell
Dim d As CalendarDay
Dim c As TableCell
Dim EventID as Integer = 52
Dim EventDesc As String = "my event"
currentCell.Text = EventDesc
currentCell.Attributes.Add("onclick", "launchAgenda(" & EventID.ToString & ")")
End Sub 'CustomizeDay
// Javascript function (assumes rwm is a radwindow manager on page
function launchAgenda(EventID)
{
var oWnd = $find("<%= rwmAgenda.ClientID %>");
oWnd.show();
oWnd.setSize(900,700);
oWnd.moveTo(10,10);
oWnd.setUrl("Faculty/Agenda.aspx?EID=" + EventID);
}
</script>
' Visual Basic DayRender sub
Public Sub CustomizeDay(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles RadCalendar1.DayRender
Dim CurrentDate As DateTime = e.Day.Date
Dim currentCell As TableCell = e.Cell
Dim d As CalendarDay
Dim c As TableCell
Dim EventID as Integer = 52
Dim EventDesc As String = "my event"
currentCell.Text = EventDesc
currentCell.Attributes.Add("onclick", "launchAgenda(" & EventID.ToString & ")")
End Sub 'CustomizeDay