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

Predefined category list

6 Answers 140 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Cheau-Long
Top achievements
Rank 1
Cheau-Long asked on 06 May 2011, 01:27 AM
Hi Telerik,

When using RadSchedueView, I'd like to use the predefined category list and assign a category to the appointment dynamically. This list is defined in RadScheduler. When I added these two references, it had name conflicts. How can I use this predefined list in ScheduleView?

Thanks.
Cheau

6 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 06 May 2011, 12:10 PM
Hello Cheau,

RadScheduleView has predefined the same Categories list as in the RadScheduler.  Could you please explain in more details your scenario and why you need RadScheduler's categories? Thanks in advance

Regards,
Yana
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
Cheau-Long
Top achievements
Rank 1
answered on 06 May 2011, 04:42 PM
Hi Yana,

Thanks for your response. No, I just need ScheduleView, but couldn't find the predefined list mentioned from the online documentation. The documentation simply said the list was defined in Scheduler. Can you show me where it is in the ScheduleView from codes?

Thanks.
Cheau
0
Yana
Telerik team
answered on 11 May 2011, 02:16 PM
Hello Cheau,

You can check CategoriesSource property of the RadScheduleView - it's a collection of Category objects which by default holds the predefined categories.

Could you please tell us where have you read about this?  It seems that we should update the documentation. Thanks in advance

All the best,
Yana
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
Cheau-Long
Top achievements
Rank 1
answered on 11 May 2011, 06:25 PM
Hi Yana,

I could get the list through codebeind by using RadScheduleView.CategoriesSource at runtime.But what I'm looking for is a static method that I can access this default category in design time. Also, I'm using MVVM, all my codes are in VM.

RadScheduler has this static list not found in RadScheduleView. http://www.telerik.com/help/wpf/radscheduler-features-categories.html

Thanks,
Cheau
0
Yana
Telerik team
answered on 16 May 2011, 01:19 PM
Hello Cheau,

I'm sorry for my misunderstanding.

You are right, RadScheduleView doesn't provide a static list of the predefined categories.  You can access the categories through the ScheduleView instance, for example:

<telerik:RadComboBox x:Name="combobox" ItemsSource="{Binding ElementName=ScheduleView, Path=CategoriesSource}" DisplayMemberPath="DisplayName" />

or the other suggestion is to create a collection of categories (the same as the predefined) in the view-model class and bind the RadScheduleView to it.

Hope this helps.

Greetings,
Yana
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
Supreet
Top achievements
Rank 1
answered on 02 Aug 2011, 05:21 PM
Hi Cheau,
    Since the Schedule View categories are not available statically. You can do some thing like this.
IQueryable<Category> categorylist = ((Telerik.Windows.Controls.ScheduleViewBase)(yourScheduleViewControl)).CategoriesSource.AsQueryable().Cast<Category>();

Here I have converted the categories available at runtime to a list collection which can then be used any where in your code.

Hope this helps.
Supreet
Tags
ScheduleView
Asked by
Cheau-Long
Top achievements
Rank 1
Answers by
Yana
Telerik team
Cheau-Long
Top achievements
Rank 1
Supreet
Top achievements
Rank 1
Share this question
or