This is a migrated thread and some comments may be shown as answers.

question on timeslot.controls.enabled

1 Answer 81 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Martin Gartmann
Top achievements
Rank 2
Martin Gartmann asked on 17 Dec 2008, 12:30 PM
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.




 
    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 


1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 17 Dec 2008, 01:55 PM
Hi Martin,

Setting e.TimeSlot.Control.Enabled = False will disable any server controls in this time slot. However, you can still double click on it to envoke the inline or the advanced form.

If you want to disalbe certain time slots, you should use this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/setting-special-days-or-time-slots-in-radscheduler.aspx 


Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Martin Gartmann
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or