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

Bind a scheduler with custom database contents

3 Answers 57 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mahesh
Top achievements
Rank 1
Mahesh asked on 20 Aug 2012, 09:24 AM

Hi,

 I am new to this telerik controls. I am using Telerik scheduler to manage some events. 

We are planning to use wcf services to bind and update data since to get a better UI. 

So far i have done like this i have added a web page and added the scheduler control in it. After that created a wcf service TestService.svc and in the code we have added GetAppointments method in the operation contract. Then added a DataProvider.cs which inherits DbSchedulerProviderBase class.
Then we override the method GetAppointments() and returned a list of Appointments. 

So far its working perfectly.

Now suppose i have a table TestTable and i need to bind those data instead of list<AppointmentData>.  Is there any way to do this?
Also i want to know how to pass custom parameters. Can all these done using wcf services? 

For reference i have followed the link http://demos.telerik.com/aspnet-ajax/scheduler/examples/wcf/defaultcs.aspx ..



Thanks,
Mahesh


3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Aug 2012, 01:35 PM
Hi Mahesh,

Please, review this topic - Sending additional information to the Web Service.

As for the other question - "Now suppose i have a table TestTable and i need to bind those data instead of list<AppointmentData>. Is there any way to do this?", I am not sure I understand it. Can you please elaborate?

Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mahesh
Top achievements
Rank 1
answered on 21 Aug 2012, 03:41 PM
Hi Peter,

   Thank you very much for the reply.

I'll explain the second part... The GetAppointments() method will return a list<AppointmentData> and the AppointmentData is a class defined by Telerik and which contain some predefined set of properties.

Suppose i want to show some text from my custom table , in that case do i need to assign the value to AppointmentData Subject property or can i add some properties to this Appointment class as you mentioned like adding properties to SchedulerInfo?

Also when i tried to add and bind appointments using Appointment template , from wcf service , its not working.. Is there any issue in binding appointments using Appointment template with wcf services.

Thanks,
Mahesh

0
Accepted
Peter
Telerik team
answered on 22 Aug 2012, 04:24 PM
Hello Mahesh,

If you need to associate additional information with the appointments, you can use Custom Attributes.

AppointmentTemplate is applicable only with server side binding. With Web Service or WCF service binding you can use jQuery template plugin as shown in this demo.
function onSchedulerDataBound(scheduler) {
          var $ = jQuery;
          $(".rsAptDelete").each(function () {
              var apt = scheduler.getAppointmentFromDomElement(this);
              // creating an object containing the data that should be applied on the template
              var tmplValue = { Description: apt.get_description() };
              // instantiate the template, populate it and insert before the delete handler (".rsAptDelete")
              $("#tmplAppDescription").tmpl(tmplValue).insertBefore(this);
          });
      }



All the best, Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Peter
Telerik team
Mahesh
Top achievements
Rank 1
Share this question
or