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

Enforce Category and TimeMarker

4 Answers 85 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 16 Jul 2014, 09:10 AM
Hi,

my approach is to make sure that an appointment has a TimeMarker and a Category.

The TimeMarker is set by code - so I want to remove the TimeMarker Combobox from the edit / create dialog.

The Category on the other hand MUST selected in the "create dialog"...
BUT:
a.) The "Clear" Button in the category combobox should be removed
--NO clear - just mandatory select
b.) The category Combobox should be disabled if the appointment is edited (not newly created)

How can this be done? (Pleas no "Code behind event handlers" if possible)

Manfred

4 Answers, 1 is accepted

Sort by
0
ManniAT
Top achievements
Rank 2
answered on 16 Jul 2014, 10:56 AM
And the same as above I need for Resources.

In this case I also have to disable dragging to a different group (if grouping for resource types).
0
Yana
Telerik team
answered on 17 Jul 2014, 11:24 AM
Hi Manfred,

In order to achieve the required scenario, you will need to customize the EditAppointmentDialog through the EditAppointmentDialogStyle property of the ScheduleView.  For detailed instructions on the exact approach please check the Custom Dialogs article in our documentation.

After retrieving the EditAppointmentDialog ControlTemplate, you can directly remove the TimeMarker ComboBox ( it is with name=PART_TimeMarkers) and set the ClearSelectionButtonVisibility property of the Categories ComboBox ( with name=PART_Categories) to "Collapsed".  Additionally, you could bind its IsEnabled property to the ViewMode property of the AppointmentDialogViewModel. ViewMode has three values according to the way the dialog is opened: Add, Create and ReadOnly. So using a converter and according to the ViewMode value, you could enable/disable the ComboBox.

I have attached a sample example to demonstrate all above, please note that I've used Implicit Styles to set the theme as this approach makes such customizations much easier ( you do not need to copy all the referenced resources).

The same approach can be used with the resources. Furthermore, in order to disable the the dragging of the appointments you should customize the ScheduleView DragDropBehavior as explained in this help topic.

I hope this will be helpful.

Regards,
Yana
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
ManniAT
Top achievements
Rank 2
answered on 17 Jul 2014, 02:43 PM
Hi Yana,

I already changed the dialog (yesterday).
By the way - I had to take one from the installation (themes) directory because neither blend nor VS2013 are able to generate (extract) the correct resources.
The theme is "default" and also "Resources" doesn't work with the generated template.

Anyhow - using the template from the installation directory I was able to change the dialog for my needs.

I'll check the drag drop you suggested.

Thank you for your excellent support.

Manfred
0
Kalin
Telerik team
answered on 18 Jul 2014, 01:00 PM
Hi Manfred,

We are glad you have managed to achieve the desired. If you have any other questions, let us know.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ScheduleView
Asked by
ManniAT
Top achievements
Rank 2
Answers by
ManniAT
Top achievements
Rank 2
Yana
Telerik team
Kalin
Telerik team
Share this question
or