hi
i have one problem regarding rad scheduler. i've bound the datatable with rad scheduler and all add,edit,delete and select operation working properly. but when i click the "more" option then the "recurrence" check box not displayed even i've already declare the "DataRecurrenceField" and "DataRecurrenceParentKeyField" property(in .vb file not in .aspx file)
can anybody help me.
Thanks
Chirag Prajapati
i have one problem regarding rad scheduler. i've bound the datatable with rad scheduler and all add,edit,delete and select operation working properly. but when i click the "more" option then the "recurrence" check box not displayed even i've already declare the "DataRecurrenceField" and "DataRecurrenceParentKeyField" property(in .vb file not in .aspx file)
can anybody help me.
Thanks
Chirag Prajapati
5 Answers, 1 is accepted
0
Hello Chirag,
Setting the properties should be enough. Can you please post the relevant code here? In which event do you set the properties?
Kind regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Setting the properties should be enough. Can you please post the relevant code here? In which event do you set the properties?
Kind regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
ChiragP
Top achievements
Rank 1
answered on 27 Aug 2007, 04:33 AM
hi
here i've attached the code. in page_load i call the one sub that bind the scheduler with its appropriate properties
Namespace Telerik.Web.Examples.Scheduler.Default
Partial Public Class DefaultVB
Inherits Telerik.QuickStart.XhtmlPage
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
BindScheduler()
End If
End Sub
Private Sub BindScheduler()
cls = New dbcls
Dim DTable As New DataTable
cls.dbcls()
DTable = cls.disp_data("SELECT * FROM [Appointments]")
RadScheduler1.Appointments.Clear()
With RadScheduler1
.SelectedDate = "2007-03-30"
.DayStartTime = TimeSpan.Parse("08:00:00")
.DayEndTime = TimeSpan.Parse("18:00:00")
.TimeZoneOffset = TimeSpan.Parse("03:00:00")
''.DataSourceID = "AppointmentsDataSource"
.DataKeyField = "ID"
.DataSubjectField = "Subject"
.DataStartField = "Start"
.DataEndField = "End"
.DataRecurrenceField = "RecurrenceRule"
.DataRecurrenceParentKeyField = "RecurrenceParentID"
.DataSource = DTable
.ViewType = SchedulerViewType.DayView
End With
RadScheduler1.ResourceTypes.Clear()
Dim res1 As New ResourceType
With res1
''.DataSourceID = "RoomsDataSource"
DTable = cls.disp_data("select * from [rooms]")
.DataSource = DTable
.KeyField = "ID"
.Name = "Room"
.TextField = "RoomName"
.ForeignKeyField = "RoomID"
End With
RadScheduler1.ResourceTypes.Add(res1)
Dim res2 As New ResourceType
With res2
''.DataSourceID = "UsersDataSource"
DTable = cls.disp_data("select * from [users]")
.DataSource = DTable
.KeyField = "ID"
.Name = "User"
.TextField = "UserName"
.ForeignKeyField = "UserID"
End With
RadScheduler1.ResourceTypes.Add(res2)
RadScheduler1.DataBind()
End Sub
End Class
End Namespace
thanx
Tsvetomir Tsonev
here i've attached the code. in page_load i call the one sub that bind the scheduler with its appropriate properties
Namespace Telerik.Web.Examples.Scheduler.Default
Partial Public Class DefaultVB
Inherits Telerik.QuickStart.XhtmlPage
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
BindScheduler()
End If
End Sub
Private Sub BindScheduler()
cls = New dbcls
Dim DTable As New DataTable
cls.dbcls()
DTable = cls.disp_data("SELECT * FROM [Appointments]")
RadScheduler1.Appointments.Clear()
With RadScheduler1
.SelectedDate = "2007-03-30"
.DayStartTime = TimeSpan.Parse("08:00:00")
.DayEndTime = TimeSpan.Parse("18:00:00")
.TimeZoneOffset = TimeSpan.Parse("03:00:00")
''.DataSourceID = "AppointmentsDataSource"
.DataKeyField = "ID"
.DataSubjectField = "Subject"
.DataStartField = "Start"
.DataEndField = "End"
.DataRecurrenceField = "RecurrenceRule"
.DataRecurrenceParentKeyField = "RecurrenceParentID"
.DataSource = DTable
.ViewType = SchedulerViewType.DayView
End With
RadScheduler1.ResourceTypes.Clear()
Dim res1 As New ResourceType
With res1
''.DataSourceID = "RoomsDataSource"
DTable = cls.disp_data("select * from [rooms]")
.DataSource = DTable
.KeyField = "ID"
.Name = "Room"
.TextField = "RoomName"
.ForeignKeyField = "RoomID"
End With
RadScheduler1.ResourceTypes.Add(res1)
Dim res2 As New ResourceType
With res2
''.DataSourceID = "UsersDataSource"
DTable = cls.disp_data("select * from [users]")
.DataSource = DTable
.KeyField = "ID"
.Name = "User"
.TextField = "UserName"
.ForeignKeyField = "UserID"
End With
RadScheduler1.ResourceTypes.Add(res2)
RadScheduler1.DataBind()
End Sub
End Class
End Namespace
thanx
Tsvetomir Tsonev
0
ChiragP
Top achievements
Rank 1
answered on 27 Aug 2007, 06:06 AM
hi
i got the solution regarding recurrance check box not displayed. i use to bind the scheduler in page_load event but when i try to bind it in page_init method then it is working
Thanx
i got the solution regarding recurrance check box not displayed. i use to bind the scheduler in page_load event but when i try to bind it in page_init method then it is working
Thanx
0
ChiragP
Top achievements
Rank 1
answered on 27 Aug 2007, 07:06 AM
hi
it is working if i put the scheduler binding() function in page_init event but got the other problem also. when i click the month or week view then it is not working. so is there anyother solution to show the recurance checkbox
Thanks
Chirag
it is working if i put the scheduler binding() function in page_init event but got the other problem also. when i click the month or week view then it is not working. so is there anyother solution to show the recurance checkbox
Thanks
Chirag
0
Hi Chirag,
Again, sorry for the late response and thank you for your patience.
Your solution is correct, the DataSource property cannot be persisted between postbacks and you should bind the RadScheduler instance on each page load in the Page_Init method. Also, you should only set DataSource or DataSourceID, but not both.
This is not true for the other properties, though. They are persisted in the ViewState, so you do not need to set them every time. That is why switching between views does not work - you are setting the ViewType to DayView each time.
Generally, you should move all properties, besides DataSource, to the control tag in the ASPX page. If you need to set the other properties in code, you should do it once - in Page_Init when IsPostBack is false.
Greetings,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Again, sorry for the late response and thank you for your patience.
Your solution is correct, the DataSource property cannot be persisted between postbacks and you should bind the RadScheduler instance on each page load in the Page_Init method. Also, you should only set DataSource or DataSourceID, but not both.
This is not true for the other properties, though. They are persisted in the ViewState, so you do not need to set them every time. That is why switching between views does not work - you are setting the ViewType to DayView each time.
Generally, you should move all properties, besides DataSource, to the control tag in the ASPX page. If you need to set the other properties in code, you should do it once - in Page_Init when IsPostBack is false.
Greetings,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center