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

Populating RadScheduler using Sql backend

5 Answers 291 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 07 Sep 2009, 08:58 PM
Hi, Its my first time to use radscheduler so I've been checking out sample but seems like I cant find any that uses sql database as its datasource. I already have a schedule creator using other pages, this is like subject or course scheduling. Data is already existing on the database which has data range, time range, subject, teacher, # of students, etc. . What I wanted is to make radscheduler as view only. but if you click on a schedule it will popup the details. Also I want to disable/hide the delete when you rollover the schedule.

If there are samples or documentation that would help start up my project it would be highly appreciated.

Im using ASP.NET AJAX Q1 2009

Thanks in advance,

Rj

5 Answers, 1 is accepted

Sort by
0
Axe
Top achievements
Rank 1
answered on 08 Sep 2009, 04:45 AM
Have a look at this page: http://www.telerik.com/help/aspnet-ajax/schedule_databindingusingthedatasourceproperty.html for databinding using the DataSource property. Scroll down to point 6 for the Page_Load event handler.
Once in the help section of RadScheduler have a look for the other things you wanted. I can't remember what the property for making read-only is. You can attach client event to appointment click I think which you caould use a RadWindow or something to show details. There is probably other ways. Someone else will probably give suggestions.
0
RJ
Top achievements
Rank 1
answered on 09 Sep 2009, 12:12 PM
Are all classes should really be created and needed when using Sql database as datasource? I did try some template but they dont  have that class used and its not that complicated. but then again they just using Session datasource. Is there any other easier way on accomplishing my task? Anyways will try to use this code and will give you feedback. Thanks.
0
Axe
Top achievements
Rank 1
answered on 10 Sep 2009, 10:08 AM
Although I haven't tried it, I think you can pass it any datasource - objects, datatable, dataset etc.
Will try when I get home and let you know. That page I linked to explained one way to do it.
Just pass any datasource to it and then if the database fields are named different than the defaults you can map the names to your datasource.
0
chris
Top achievements
Rank 2
answered on 11 Sep 2009, 12:30 PM
Should be a sinch really -

all you need is a sql table with a minimum of the follow fields
*  id  ( an int field set as primary key indexed for incrementing values)
*  Sched_Start (as datetime)
*  Sched_End (as datetime)
*  Title (I use as varchar(100 - this is used as text for appointments)
*  RecurringInfo (I use as varchar(1000)
*  Parent_Id (again an integer)

Drop the RadScheduler onto your page in design mode
Choose your datasource - if not set up then create a new one and lnk to your table above
        (note when creating your data source from scratch you need to choose the advance options to 
            generate the Update.Insert and Delete queries)

    set data field as a key = id
    set data field as start = Sched_Start
    set data field as end = Sched_End
    set data field as subject = Title
    set data field as recurrence storage = RecurringInfo
    set data field as recurrance parent key = ParentId 

I currently use three tables to control my diary
 1st a table of EventTypes detailing event type id and type and description
 2nd a table listing each event with details including event type id, various location/adress lines, description,contact personnel etc
and 3rdly  a table called Diary wihch pulls into the radscheduler which allows the scheduling of the events with fields set out as above

EventsType table has foregein key to Events table
Events table has a foreign key to Diary table

couple of triggers update from the events table to and from the diary - this allows inserts and update in both

noting to it from there on - just tidying up presentation and including resources should you wish



0
RJ
Top achievements
Rank 1
answered on 11 Sep 2009, 03:30 PM
Thanks for the detailed feedback I was able to get started. But then again how can I disable or hide the delete button when I rollover a schedule? how can I also disable the dates not to open window to enter schedule. Only those with schedule can be viewed. lastly how can I remove save cancel when they view created schedule... Thanks again.
Tags
Scheduler
Asked by
RJ
Top achievements
Rank 1
Answers by
Axe
Top achievements
Rank 1
RJ
Top achievements
Rank 1
chris
Top achievements
Rank 2
Share this question
or