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

[Solved] Resource not binding on edit

3 Answers 119 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 02 Apr 2009, 04:20 PM



Here is the rad scheduler and the data sources, I get the resources to enter into the db however
when I go back to edit them They do not bind the dropdown anymore.

Can someone explain what else is needed to get that to happen?

<
telerik:radscheduler runat="server"  Width="797px" SelectedView="MonthView" id="appointmentScheduler" 
            Height="565px" DataEndField="End" DataKeyField="appointmentId" DataSourceID="SqlDataSource1"  
            DataStartField="Start" DataSubjectField="subject" Skin="WebBlue"  
            StartInsertingInAdvancedForm="True" OnAppointmentDataBound="appointmentBound">               
            <resourcetypes> 
                <telerik:ResourceType DataSourceID="SqlDataSource3" ForeignKeyField="typeId"  
                    KeyField="appointmentTypeId" Name="Type" TextField="type" /> 
            </resourcetypes> 
        </telerik:radscheduler> 
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"  
            ConnectionString="<%$ ConnectionStrings:myConnection %>"  
            SelectCommand="SELECT [appointmentTypeId], [type] FROM [v2AppointmentTypes] ORDER BY [type]"
        </asp:SqlDataSource> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
            ConnectionString="<%$ ConnectionStrings:myConnection %>"  
            SelectCommand="SELECT * FROM [v2Appointment]"  
            DeleteCommand="DELETE FROM [v2Appointment] WHERE [appointmentId] = @appointmentId"  
            InsertCommand="INSERT INTO [v2Appointment] ([typeId], [Start], [End], [subject]) VALUES 
(@typeId, @Start, @End, @subject)"
  
            UpdateCommand="UPDATE [v2Appointment] SET [typeId] = @typeId, [Start] = @Start, [End] = @End, 
[subject] = @subject WHERE [appointmentId] = @appointmentId"
            <DeleteParameters> 
                <asp:Parameter Name="appointmentId" Type="Int32" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="typeId" Type="String" /> 
                <asp:Parameter Name="Start" Type="DateTime" /> 
                <asp:Parameter Name="End" Type="DateTime" /> 
                <asp:Parameter Name="subject" Type="String" /> 
                <asp:Parameter Name="appointmentId" Type="Int32" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="typeId" Type="String" /> 
                <asp:Parameter Name="Start" Type="DateTime" /> 
                <asp:Parameter Name="End" Type="DateTime" /> 
                <asp:Parameter Name="subject" Type="String" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 

3 Answers, 1 is accepted

Sort by
0
Rick
Top achievements
Rank 1
answered on 03 Apr 2009, 12:56 PM
Really??? no one?

It seems odd that not one person would have any idea why this is happening.
0
Accepted
Veselin Vasilev
Telerik team
answered on 06 Apr 2009, 02:55 PM
Hi mystrymaster,

I could not reproduce the problem in our online demo.
Can you use it as a base and create a simple project that demonstrates the issue?
You can attach it in another support ticket.

Greetings,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Rick
Top achievements
Rank 1
answered on 06 Apr 2009, 06:11 PM
It wasn't until I tried to set up a sample project to send off that I noticed the problem.

The typeId field in the appointment table field was set as a varchar even though it was just housing the 1,2, 3, 4 or 5 of the appointment type it was not a match, adjusting the field to the int datatype it worked perfectly.
Tags
Scheduler
Asked by
Rick
Top achievements
Rank 1
Answers by
Rick
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or