Calendar and window integration issue

2 posts, 0 answers
  1. Karl Wilkens
    Karl Wilkens avatar
    206 posts
    Member since:
    Oct 2012

    Posted 25 Oct 2008 Link to this post

    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.setUrl("Faculty/Agenda.aspx?EID=" + EventID);

    ' 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
  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 28 Oct 2008 Link to this post

    Hello Karl,

    If you want to keep the window instance after it is opened for a particular cell open and initiating a postback request, you will need to find a way to re-invoke the launchAgenda(EventID) client method the response is received back from the server.  This strictly depends on your custom logic, that is why I am not able to provide a definite solution/code snippet for your case. Let me know if I am missing something.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top