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

Help Wanted!

9 Answers 132 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 07 Jul 2008, 09:56 AM
Hi,

I'm using the scheduler control and currently following the getting started tutorial in the documentation.

There is a strange problem that i'm sure is caused by a setting on my website, or maybe just something i'm doing.

Basically, when adding an appointment, I add the text and click the green tick. The screen post backs but the appointment is not displayed. Can anyone help? My aspx is below, the classes are just copied and pasted from the getting started section.

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<div>

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End"

DataKeyField="ID" DataSourceID="ObjectDataSource1" DataStartField="Start"

DataSubjectField="Subject">

</telerik:RadScheduler>

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"

SelectMethod="AllData" TypeName="AppointmentList"></asp:ObjectDataSource>

</div>

</form>

</

body>

</

html>

9 Answers, 1 is accepted

Sort by
0
Yamil
Top achievements
Rank 1
answered on 07 Jul 2008, 03:45 PM
Jonathan, you have to save the appointment into a database o any datasource your are using (xml, etc)
For example  in the Telerik samples it is saved to a session...
0
Jonathan
Top achievements
Rank 1
answered on 08 Jul 2008, 02:12 PM
Thanks, I am doing that but the problem I get is when I want to create an appointment, expand it and then save it.

If I load the existing appointments from the datasource I can resize them and the new size is persisted and I can call a method to save the new times to the database.

However, if I add a new appointment by double clicking, and then attempt to re-size it, it then just goes back to its original size.

I can see that the web demo's do what i'm trying to do. I'm just using a script manager and scheduler control with nothing else different. I suppose the only difference is that im using the scheduler inside a frame but I cant see that causing a problem.

The code I have is:

ASPX...

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<div>

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<telerik:RadScheduler ID="RadScheduler1" runat="server">

</telerik:RadScheduler>

</div>

</form>

</

body>

</

html>

C#

using

System;

using

System.Configuration;

using

System.Data;

using

System.Linq;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.HtmlControls;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Xml.Linq;

using

System.Data.SqlClient;

public

partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

SqlConnection con = new SqlConnection("SERVER=DEV2008;Integrated Security=TRUE;Initial Catalog=RadSchedulerTest");

SqlDataAdapter dat = new SqlDataAdapter("SELECT * FROM Appointments", con);

DataTable dt = new DataTable();

dat.Fill(dt);

RadScheduler1.DataSource = dt;

RadScheduler1.DataEndField =

"EndTime";

RadScheduler1.DataStartField =

"StartTime";

RadScheduler1.DataKeyField =

"AppointmentID";

RadScheduler1.DataSubjectField =

"EntryText";

RadScheduler1.DataBind();

}

}

}

0
Peter
Telerik team
answered on 08 Jul 2008, 02:56 PM
Hi Jonathan,

Please, make sure you have defined Insert, Update, Delete and Select statements for your data source.  

All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jonathan
Top achievements
Rank 1
answered on 09 Jul 2008, 08:36 AM
Thanks Peter,

Just 1 more thing.

I'm creating an appointment at 9am. I'm then dragging the block to 5pm. The control displays that the block ends at 5pm as i'd expect, but the database time says 5:30pm. I'm using the default 30 minutes per row. Is there something I need to change to fix this?
0
Jonathan
Top achievements
Rank 1
answered on 09 Jul 2008, 08:36 AM
Thanks Peter,

Just 1 more thing.

I'm creating an appointment at 9am. I'm then dragging the block to 5pm. The control displays that the block ends at 5pm as i'd expect, but the database time says 5:30pm. I'm using the default 30 minutes per row. Is there something I need to change to fix this?
0
Jonathan
Top achievements
Rank 1
answered on 09 Jul 2008, 08:36 AM
Thanks Peter,

Just 1 more thing.

I'm creating an appointment at 9am. I'm then dragging the block to 5pm. The control displays that the block ends at 5pm as i'd expect, but the database time says 5:30pm. I'm using the default 30 minutes per row. Is there something I need to change to fix this?
0
Peter
Telerik team
answered on 09 Jul 2008, 11:44 AM

What is the duration of your appointment? By default it should be one hour, so if you drag it to the 5 pm block, it should span to 6pm. Could you please test our online examples and verify if you get the expected behavior on your side? If not, then please explain what you expect to happen and we will try to find a solution. Also, you can send us the code of your implementation so we can examine and try to create a test project.


All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jonathan
Top achievements
Rank 1
answered on 09 Jul 2008, 04:15 PM
Hi Peter, it works as expected on the live demo's site. I think it may be something to do with the fact that the application uses frames.

I created a simple project without using frames and it works fine.

When in the application that uses frames, I get the problem I outlined earlier plus when dragging, the bottom of the appointment is positioned between half past and the hour. This obviously makes it impossible to use the scheduler.

If there are no previous reports of issues with frames, i'll attempt to create a project and send it to you.

Regards,
0
Jonathan
Top achievements
Rank 1
answered on 09 Jul 2008, 04:15 PM
Hi Peter, it works as expected on the live demo's site. I think it may be something to do with the fact that the application uses frames.

I created a simple project without using frames and it works fine.

When in the application that uses frames, I get the problem I outlined earlier plus when dragging, the bottom of the appointment is positioned between half past and the hour. This obviously makes it impossible to use the scheduler.

If there are no previous reports of issues with frames, i'll attempt to create a project and send it to you.

Regards,
Tags
Scheduler
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Yamil
Top achievements
Rank 1
Jonathan
Top achievements
Rank 1
Peter
Telerik team
Share this question
or