Dear all,
i have a question about timeslot.controls.enabled. I use the following code to set the CssStyle for a timeslot.
The apparence part is working as it should be, but also when a timeslot.control.enabeld = false it is still possible to insert new appoinments in this place.
As far as i understood, this parameter should control/Stop edit/insert on the timeslot.
What is wrong in my case.
i have a question about timeslot.controls.enabled. I use the following code to set the CssStyle for a timeslot.
The apparence part is working as it should be, but also when a timeslot.control.enabeld = false it is still possible to insert new appoinments in this place.
As far as i understood, this parameter should control/Stop edit/insert on the timeslot.
What is wrong in my case.
Protected Sub rsAll_TimeSlotCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.TimeSlotCreatedEventArgs) Handles rsAll.TimeSlotCreated |
' die Sichtbarkeit und den Zugriff in Anhängigkeit der Resource zu steuern |
' 1 - None, 2 - View, 3 - Edit |
If e.TimeSlot.Start < Now Then |
e.TimeSlot.Control.Enabled = False |
ElseIf e.TimeSlot.Resource.Text = "DRX-600" And Session("myDRX600") = 3 Then |
e.TimeSlot.Control.Enabled = True |
ElseIf e.TimeSlot.Resource.Text = "DRX-600" And Session("myDRX600") = 2 Then |
e.TimeSlot.Control.Enabled = False |
ElseIf e.TimeSlot.Resource.Text = "DRX-400" And Session("myDRX400") = 3 Then |
e.TimeSlot.Control.Enabled = True |
ElseIf e.TimeSlot.Resource.Text = "DRX-400" And Session("myDRX400") = 2 Then |
e.TimeSlot.Control.Enabled = False |
ElseIf e.TimeSlot.Resource.Text = "DSX-400" And Session("myDSX400") = 3 Then |
e.TimeSlot.Control.Enabled = True |
ElseIf e.TimeSlot.Resource.Text = "DSX-400" And Session("myDSX400") = 2 Then |
e.TimeSlot.Control.Enabled = False |
ElseIf e.TimeSlot.Resource.Text = "DPX-250" And Session("myDPX250") = 3 Then |
e.TimeSlot.Control.Enabled = True |
ElseIf e.TimeSlot.Resource.Text = "DPX-250" And Session("myDPX250") = 2 Then |
e.TimeSlot.Control.Enabled = False |
ElseIf e.TimeSlot.Resource.Text = "DPX-200" And Session("myDPX200") = 3 Then |
e.TimeSlot.Control.Enabled = True |
ElseIf e.TimeSlot.Resource.Text = "DPX-200" And Session("myDPX200") = 2 Then |
e.TimeSlot.Control.Enabled = False |
Else |
e.TimeSlot.Control.Enabled = False |
End If |
If e.TimeSlot.Control.Enabled = True Then |
e.TimeSlot.CssClass = "Enabled" |
ElseIf e.TimeSlot.Control.Enabled = False Then |
e.TimeSlot.CssClass = "Disabled" |
End If |
End Sub |