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

Confusion about Advanced Template DataSource

3 Answers 41 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ramie C
Top achievements
Rank 1
Ramie C asked on 08 Apr 2010, 03:58 PM
I am currently looking through http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx and I am trying to figure out where this example is getting its data from. I noticed in the other example of the templates http://demos.telerik.com/aspnet-ajax/scheduler/examples/templates/defaultcs.aspx they use them, but it appears here they do not. Is there something I am missing? How would they link it to their data source?

Thanks

Ramie

3 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 08 Apr 2010, 07:45 PM
Hello Ramie C,

In this example, the Scheduler uses an XmlSchedulerProvider to retrieve the data. The Provider is assigned in the code-behind of the page (Default.aspx.cs).

Regards,
Dimitar Milushev
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
benitolopez_sistemas
Top achievements
Rank 1
answered on 29 Jun 2010, 04:25 AM
Hi, I need to know how can I have a sqlserver database instead an XML file. I mean, in all the samples you have an .xml provider but I need to know how to read/write all the information into a sqlserver database.

Which must be the sqlserver tables structure for an advanced resource sample(users, rooms, appointment)?

http://www.telerik.com/support/kb/aspnet-ajax/scheduler/sample-project-of-the-customizing-the-advanced-template-example.aspx

http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx



0
Dimitar Milushev
Telerik team
answered on 01 Jul 2010, 03:30 PM
Hello,

You can use an SqlDataSource to bind the Scheduler to data retrieved from an SQL server. This example shows how to use RadScheduler with a DataSource. It uses a SessionDataSource which is a simple wrapper around a regular SqlDataSource and is used for the sake of our demos. You can easily replace it with an SqlDataSource.

We do not impose a specific structure on the tables that contain the Resource data. The only important thing is to properly define the ResourceTypes:

<telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID"
                     DataSourceID="RoomsDataSource" />

Let me explain the properties

  • DataSourceID - ID of the DataSource control used to retrieve the Resource data
  • KeyField - name of the column in the Resource table that contains the primary key/ID of the record
  • ForeignKeyField - the column in the Appointments table that points to the Resource ID
  • TextField - the column with the Text of each resource record
  • Name - simply a name associated with this resource type

I hope this helps
All the best,
Dimitar Milushev
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
Ramie C
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
benitolopez_sistemas
Top achievements
Rank 1
Share this question
or