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

RadScheduler no record is shown from sql database

1 Answer 20 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Chris asked on 07 Dec 2018, 04:13 AM



I have followed the guide to create a simple project with RadScheduler with vs 2010.

In the project, the RadScheduler retrieves the record from sql database.

However, after I start the website,

1. no appointment option is shown up after double-click any cells.

2. no event is shown in the scheduler. (the record is exist in sql database and tested ok for the connection)


What do I miss?

Below is my code:


<%@ Page Language="VB" AutoEventWireup="true" CodeFile="RadSchedulerWebForm.aspx.vb" Inherits="RadSchedulerWebForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<head runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    <script type="text/javascript">
        //Put your JavaScript code here.
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
    <telerik:RadScheduler runat="server" ID="RadScheduler1" DataEndField="EndTime"
        DataKeyField="id" DataSourceID="SqlDataSource1" DataStartField="StartTime"
        ReadOnly="True" StartEditingInAdvancedForm="false"
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:Scheduler_TestConnectionString %>"
        DeleteCommand="DELETE FROM [scheduler_table] WHERE [id] = @id"
        InsertCommand="INSERT INTO [scheduler_table] ([id], [Subject], [StartTime], [EndTime]) VALUES (@id, @Subject, @StartTime, @EndTime)"
        SelectCommand="SELECT * FROM [scheduler_table]"
        UpdateCommand="UPDATE [scheduler_table] SET [Subject] = @Subject, [StartTime] = @StartTime, [EndTime] = @EndTime WHERE [id] = @id">
            <asp:Parameter Name="id" Type="Int32" />
            <asp:Parameter Name="id" Type="Int32" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="id" Type="Int32" />

1 Answer, 1 is accepted

Sort by
Peter Milchev
Telerik team
answered on 11 Dec 2018, 02:09 PM
Hello Chris,

Would you please try setting the ReadOnly property to false so that you can insert an appointment via the built-in forms and check if it will be inserted and visualized correctly? 

Also, please ensure the appointments you have in the datasource are in the Visible range of the Scheduler. When the SelectedDate is not explicitly set for the RadScheduler, the default value for this property is used, which is equal to DateTime.Now.

For your convenience, I have attached a sample runnable project that has an implementation similar to the provided one and works as expected.

Meanwhile, you can check for any JavaScript errors in the browser console that might prevent the proper behavior of the control.

Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question