Hi All,
I'm using the scheduler to display two different types of calendar data although it comes from one stored procedure and is merged there. I want to be able to have the user click on an appointment and then the relevant screen be displayed for that appointment type.
I am trying to use Attributes.Add to add a javascript call to one of two functions (with the relevant ID for the task). The javascript will then open a window with the correct page in it. The following is some abbreviated code that I cannot get to work, the scheduler itself works fine but not the click event.
Any pointers?
Regards,
Jon
I'm using the scheduler to display two different types of calendar data although it comes from one stored procedure and is merged there. I want to be able to have the user click on an appointment and then the relevant screen be displayed for that appointment type.
I am trying to use Attributes.Add to add a javascript call to one of two functions (with the relevant ID for the task). The javascript will then open a window with the correct page in it. The following is some abbreviated code that I cannot get to work, the scheduler itself works fine but not the click event.
Private Sub uxRadScheduler_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles uxRadScheduler.AppointmentDataBound |
Dim dataRowView As System.Data.DataRowView = CType(e.Appointment.DataItem, System.Data.DataRowView) |
If dataRowView.Item("LeaveID") IsNot System.DBNull.Value Then |
e.Appointment.Attributes.Add("onclick", "javascript:ViewLeave('" & dataRowView.Item("LeaveID").ToString() & "');") |
Else |
e.Appointment.Attributes.Add("onclick", "javascript:ViewTask('" & dataRowView.Item("TaskID").ToString() & "');") |
End If |
End Sub |
Any pointers?
Regards,
Jon