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

Possible to use without databinding?

4 Answers 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 14 Oct 2010, 09:19 AM
I'd like to use the scheduler without databinding by setting it up using Javascript. Is this possible?

4 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 14 Oct 2010, 12:10 PM
Hi Simon,

RadScheduler requires some sort of data binding so that it can store and retrieve the information it displays about appointments. At a minimum, the data for the scheduler must include for each appointment a Subject, a Start time, and an End time

You can bind the scheduler to either a standard ASP.NET data source control, or to a custom provider. There are three ways of binding RadScheduler to its data:

 Please take a look at this help topic for more information.

Kind regards,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Peter
Telerik team
answered on 14 Oct 2010, 12:14 PM
Hi Simon,

You can also consider binding RadScheduler to a Web Service as shown in this demo.


Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Simon
Top achievements
Rank 1
answered on 14 Oct 2010, 01:57 PM
Hi there, I managed to do this. However I can't get the description to appear as part of an appointment.

I tried various things and in the end I simply tried to render it myself like this using the ClientAppointmentCreated event:

function clientAppointmentCreated(o, e) {
 
    var apt = e.get_appointment();
 
    $(apt.get_element()).find(".rsAptContent").html("<div class='rsAptContentTitle'>" + apt._subject + "</div><div class='rsAptContentContent'>" + apt._description + "</div>");
     
}

Problem is, the box it goes into does not increase in size to accomodate the contents, there is only room for one line of text. Is there a better solution? I was kind of worried this was related to using a webservice.

My control code is:

<telerik:RadScheduler ID="radScheduler" runat="server" Height=""
 HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1"
 onresourcespopulating="radScheduler_ResourcesPopulating" ReadOnly="true"
 AppointmentStyleMode="Default" EnableDescriptionField="true"
 OnClientAppointmentCreated="clientAppointmentCreated"
 >
  
 <WebServiceSettings Path="../WebServices/MyService.asmx" ResourcePopulationMode="ServerSide" />
 
</telerik:RadScheduler>

Thanks
0
Veronica
Telerik team
answered on 14 Oct 2010, 04:27 PM
Hi Simon,

The easier way to show Description under Appointment subject is by using AppointmentTemplate as in this demo:

<AppointmentTemplate>
    <div>
    <%# Eval("Subject") %></div>
    <div style="font-style: italic;">
    <%# Eval("Description") %></div>
</AppointmentTemplate>

Hope this helps.

Best wishes,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Simon
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Peter
Telerik team
Simon
Top achievements
Rank 1
Share this question
or