I am studying how to make a custom advanced form here: http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultvb.aspx
I have a question about this part:
<
scheduler:AdvancedForm
runat
=
"server"
ID
=
"AdvancedEditForm1"
Mode
=
"Edit"
Subject='<%# Bind("Subject") %>'
Description='<%# Bind("Description") %>'
Start='<%# Bind("Start") %>'
End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
Reminder='<%# Bind("Reminder") %>'
AppointmentColor='<%# Bind("AppointmentColor") %>'
UserID='<%# Bind("User") %>'
RoomID='<%# Bind("Room") %>' />
How is the RecurrenceParentID passed to the RadSchedulerRecurrenceEditor? Also, how is the primary key bound? (With the built in advance form it's DataKeyField="Schedule_id" for my RadScheduler)
Note: I am binding in my codebehind after every postback using an object based on this: http://www.telerik.com/help/aspnet-ajax/scheduler-using-datasource-property.html
So the binding in my codebehind is like:
Private
Sub
BindSchedule()
Dim
ds
As
List(Of objCRM.Schedule) = objCRM.Schedule.SelectScheduleByUser(Session(
"User_id"
))
Scheduler.DataSource = ds
Scheduler.DataBind()
End
Sub
Here is how my RadScheduler is currently defined:
<
rad:RadScheduler
runat
=
"server"
ID
=
"Scheduler"
Width
=
"753px"
Height
=
"600px"
EnableExactTimeRendering
=
"true"
StartEditingInAdvancedForm
=
"true"
StartInsertingInAdvancedForm
=
"true"
DataKeyField
=
"Schedule_id"
DataStartField
=
"Start"
DataEndField
=
"End"
DataSubjectField
=
"Subject"
DataDescriptionField
=
"Description"
DataRecurrenceField
=
"RecurrenceRule"
DataReminderField
=
"Reminder"
DataRecurrenceParentKeyField
=
"RecurrenceParentSchedule_id"
AppointmentContextMenuSettings-EnableDefault
=
"false"
TimeSlotContextMenuSettings-EnableDefault
=
"false"
TimelineView-UserSelectable
=
"false"
>
<
AdvancedForm
Modal
=
"true"
/>
<
Reminders
Enabled
=
"True"
/>
</
rad:RadScheduler
>
Also I'm using 2011.1.519.40 of the dll.
Thanks,
Dan
10 Answers, 1 is accepted
I understand your confusement. As our online demo for custom advanced form is with RadScheduler bound to XmlProvider you have some doubts about the implementation with SqlDataSource.
I've created a sample demo to show you how to implement binding to SqlDataSource and use custom advanced form.
Please let me know if you have further questions.
All the best,
Veronica Milcheva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Sorry, that didn't help. I am binding in the codebehind with objects, not from an SqlDataSource. See the links above ^^^^^^^^^^^
Your only reference to RecurrenceParentID is in this SqlDataSource.
By some reason I didn't received the links that you are refering to. Could you please provide them as well.
As per the main question - my demo should give you a nice "how to" even when you are binding to custom objects and not to a SqlDataSource. However if you still need help - could you please provide me your code so I can inspect it and help you?
Thank you!
Greetings,
Veronica Milcheva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Thanks again,
Dan
Attached is a demo with RadScheduler bound to a list of AppointmentInfo objects and Custom Advanced form. I hope you find it useful.
Greetings,
Peter
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I am studying this now and it is making sense.
Dan
I have a followup question about applying different skins. In my website I am using a mix of skins and custom controls/colors schemes.
Can I apply Skin="Vista" for the RadScheduler and somehow style the buttons of the Advanced form with Skin="Outlook"?
I tried this by adding a form decorator and changing the Advanced form UpdateButton and CancelButton to RadButtons with Skin="Outlook". I get the other sprite background underneath the buttons I add. Please see the attached screenshot.
Thanks,
Dan
The save and cancel buttons are nested in wrappers which have predefined styles. You should remove the CssClass property and you can set any custom style inline for example.
<
asp:Panel
runat
=
"server"
ID
=
"ButtonsPanel"
style
=
"text-align:right; padding-bottom:15px"
>
<
telerik:RadButton
runat
=
"server"
ID
=
"UpdateButton"
Text
=
"Save"
Skin
=
"Outlook"
Width
=
"60px"
>
</
telerik:RadButton
>
<
telerik:RadButton
runat
=
"server"
ID
=
"CancelButton"
CommandName
=
"Cancel"
Text
=
"Cancel"
Skin
=
"Outlook"
Width
=
"60px"
CausesValidation
=
"false"
>
</
telerik:RadButton
>
</
asp:Panel
>
Best wishes, Peter
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I am attempting to prepopulate advance form fields based on: http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-access-controls-in-the-advanced-form.aspx
This was working with the built in advanced form but now
e.Container.FindControl(
"Subject"
)
returns Nothing from the following code:Protected
Sub
RadScheduler1_FormCreated(sender
As
Object
, e
As
Telerik.Web.UI.SchedulerFormCreatedEventArgs)
Handles
RadScheduler1.FormCreated
If
(e.Container.Mode = SchedulerFormMode.AdvancedEdit)
OrElse
(e.Container.Mode = SchedulerFormMode.AdvancedInsert)
Then
Dim
txtSubj
As
RadTextBox =
DirectCast
(e.Container.FindControl(
"Subject"
), RadTextBox)
Dim
txtDesc
As
RadTextBox =
DirectCast
(e.Container.FindControl(
"Description"
), RadTextBox)
End
If
End
Sub
Is there something about how the SchCustomAdvFormWithObjectsList.zip project was setup that makes this method of accessing the controls broken?
Edit, Figuring this out. I can access the Subject through the following:
If
e.Container.Mode = SchedulerFormMode.AdvancedEdit
OrElse
e.Container.Mode = SchedulerFormMode.AdvancedInsert
Then
Dim
c1
As
Control = e.Container.FindControl(
"AdvancedInsertForm1"
)
If
c1
Is
Nothing
Then
c1 = e.Container.FindControl(
"AdvancedEditForm1"
)
End
If
Dim
c2
As
Control = c1.FindControl(
"AdvancedEditOptionsPanel"
)
Dim
c3
As
Control = c2.FindControl(
"BasicControlsPanel"
)
Dim
txtSubj
As
Control = c3.FindControl(
"SubjectText"
)
End
If
Is there no better way?
Thanks,
Dan
When using the Advanced Tempaltes, handling FormCreated is obsolete since you can access the controls directly in the supplied user controls - AdvancedForm.ascs, ResourceControls.ascx, etc.
Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.