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

Example of using Scheduler advanced form with LinqDataSource

4 Answers 97 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 14 Aug 2011, 06:16 PM
Hi All.
I try to add appointment organizer to one of our projects using your scheduler control. It working fine if not use Advanced form for editing and inserting appointments. But I need tp add just one text box in have to use your customer controls from live examples. I added those controls using Scheduler scenario wizard. problem now how to bind data from LinqDataSources (used for Appoointments and ResourceTypes) to the form. Have you example? Thanks.
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Windows7" Height="551px"
                    ShowFooter="true" TimeZoneOffset="03:00:00" DayStartTime="08:00:00" DayEndTime="21:00:00"
                    FirstDayOfWeek="Monday" LastDayOfWeek="Friday" EnableDescriptionField="true"
                    AppointmentStyleMode="Default" OnNavigationComplete="RadScheduler1_NavigationComplete" OnClientFormCreated="schedulerFormCreated"
                    OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert" DataKeyField="AppointmentID" CustomAttributeNames="Charge"
                    DataSubjectField="AppSubject" DataEndField="DateTimeDepart" DataStartField="DateTimeArrived"
                    DataDescriptionField="AppDescription" DataSourceID="LinqDataSource1" GroupBy="Resources"
                    StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="true">
                    <AdvancedForm Modal="true" />
                    <TimelineView UserSelectable="false" />
                    <MonthView UserSelectable="false" />
                    <WeekView UserSelectable="false" />
            <AdvancedForm Modal="true" />
            <Reminders Enabled="false" />
             <AppointmentTemplate>
                        <div class="rsAptSubject">
                            <%# Eval("Subject") %>
                        </div>
                        <%# Eval("Description") %>
                    </AppointmentTemplate>
            <%--<AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("AppSubject") %>'
                    Description='<%# Bind("AppDescription") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' CustomerID='<%# Bind("CustomerID") %>'
                    ResourceID='<%# Bind("ResourceID") %>' />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("AppSubject") %>'
                    Description='<%# Bind("AppDescription") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' CustomerID='<%# Bind("CustomerID") %>'
                    ResourceID='<%# Bind("Room") %>' />
            </AdvancedInsertTemplate>--%>
             <TimeSlotContextMenuSettings EnableDefault="true" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                    <ResourceTypes>
                        <telerik:ResourceType KeyField="ContactID" Name="Contacts" TextField="LastName" ForeignKeyField="ContactID"
                            DataSourceID="LinqDataSource2" />
                        <telerik:ResourceType KeyField="ResourceID" Name="Resources" TextField="LastName"
                            ForeignKeyField="ResourceID" DataSourceID="LinqDataSource3" />
                    </ResourceTypes>
                </telerik:RadScheduler>
 <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Apointments" EnableInsert="true" EnableDelete="true" EnableUpdate="true">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Contacts">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Resources">
    </asp:LinqDataSource>

4 Answers, 1 is accepted

Sort by
0
Oleg
Top achievements
Rank 1
answered on 15 Aug 2011, 05:08 PM
Hi All.
To make solution for this more easy, I decided to redirect to a page with appointment form istead of doing this on same page. The reason for this is a number of info that I need to put for appointment record and even implement payment.
Now I need advice what events I need to use for scheduler rows double click and appointment double click.
And how can I access row and appointment params during these events.
Thank you.
0
Peter
Telerik team
answered on 17 Aug 2011, 12:33 PM
Hi Oleg,

The demo on External Edit in RadDock will help you with this task. Let me know if you have further questions.

All the best, 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.

0
Oleg
Top achievements
Rank 1
answered on 08 Sep 2011, 04:21 PM
Hi all.
Thanks for example. This is exactly what I need. Only problem I have now is that buttons on page stopped working.
No postback:(

0
Peter
Telerik team
answered on 13 Sep 2011, 04:45 PM
Hello Oleg,

Can you make sure that you don't have any javascript errors on the page? If you use RadAjax, try removing it and check if this helps.

If you continue to experience problems, please isolate the issue in a sample project and send it to us via a support ticket.

All the best,
Peter
the Telerik team

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