Daniel Varrin
Top achievements
Rank 1
Daniel Varrin
asked on 14 Oct 2011, 09:52 AM
Hi,
I'm trying to integrate a RadScheduleView control in a Lightswitch application.
I want to be able to specify an additional parameter for an appointment in the creation dialog. It should appear as a dropdown-list in which one I can select a value (for example a list of contacts).
I would like to have that new parameter being validated too.
Then I want that contact name to be displayed for each appointments on the scheduleview.
How can I do that?
What I did now, instead of creating a custom Appointment class, is to use a new resource type. When I do like this the dropdown-list appears in the Appointment dialog and I can select a contact name. But I cannot do the validation and I cannot display it on the scheduler.
1) But now how do I display that contact name on the AppointmentItem template?
2) Is it the right way to do it with resources, or should I create a custom Appointment class? If yes, would it be possible to have a example (I don't know how to create the dropdown-list in the appointment dialog?
The problem is also that, as it is a Lightswitch application, I've to do the data binding in the code. If for example I add a dropdownlist control to the appointment dialog template, how do I bind the list of contact to that control using code?
I hope you can help me ;-) The demo for Custom Appointments doesn't contain the needed code :-((
Daniel
I'm trying to integrate a RadScheduleView control in a Lightswitch application.
I want to be able to specify an additional parameter for an appointment in the creation dialog. It should appear as a dropdown-list in which one I can select a value (for example a list of contacts).
I would like to have that new parameter being validated too.
Then I want that contact name to be displayed for each appointments on the scheduleview.
How can I do that?
What I did now, instead of creating a custom Appointment class, is to use a new resource type. When I do like this the dropdown-list appears in the Appointment dialog and I can select a contact name. But I cannot do the validation and I cannot display it on the scheduler.
1) But now how do I display that contact name on the AppointmentItem template?
2) Is it the right way to do it with resources, or should I create a custom Appointment class? If yes, would it be possible to have a example (I don't know how to create the dropdown-list in the appointment dialog?
The problem is also that, as it is a Lightswitch application, I've to do the data binding in the code. If for example I add a dropdownlist control to the appointment dialog template, how do I bind the list of contact to that control using code?
I hope you can help me ;-) The demo for Custom Appointments doesn't contain the needed code :-((
Daniel
20 Answers, 1 is accepted
0
Daniel Varrin
Top achievements
Rank 1
answered on 14 Oct 2011, 03:07 PM
Has anybody an example using:
1) a Custom Appointment class
2) and with an appointment dialog template in which one there is at least a dropdown-list
3) and validation for the new attributes of the custom Appointment class
4) and an example of how to display the new atrtributes on the appointmentItem template
??
For the dropdown_list used to choose the value for the new attribute, how do I set the content of the list by code?
I'm using Lightswitch and I cannot do it with data binding, because the items are entities in my application.
1) a Custom Appointment class
2) and with an appointment dialog template in which one there is at least a dropdown-list
3) and validation for the new attributes of the custom Appointment class
4) and an example of how to display the new atrtributes on the appointmentItem template
??
For the dropdown_list used to choose the value for the new attribute, how do I set the content of the list by code?
I'm using Lightswitch and I cannot do it with data binding, because the items are entities in my application.
0
Daniel Varrin
Top achievements
Rank 1
answered on 15 Oct 2011, 02:05 AM
I've created a custom Appointment class and updated the dialog template so that it contains a RadcomboBox.
How can I set the content of that combobox from the code behind of my UserControl which contains the RadscheduleView?
How can I set the content of that combobox from the code behind of my UserControl which contains the RadscheduleView?
0
Hello Daniel,
I would suggest to bind the combobox to a property in your ViewModel as described in this help article.
Greetings,
Yana
the Telerik team
I would suggest to bind the combobox to a property in your ViewModel as described in this help article.
Greetings,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Daniel Varrin
Top achievements
Rank 1
answered on 19 Oct 2011, 03:25 PM
Hi,
Thank you for your answer. Unfortunately, I'm using the RadScheduleView in a LightSwitch application and I think I cannot use a viewmodel.
I've seen that it is possible to find a control with a specified name contained in a template using a "Findxx" method. I haven't tried this solution, yet.
Thank you for your answer. Unfortunately, I'm using the RadScheduleView in a LightSwitch application and I think I cannot use a viewmodel.
I've seen that it is possible to find a control with a specified name contained in a template using a "Findxx" method. I haven't tried this solution, yet.
0
Accepted
Hello Daniel Varrin,
We are sorry for the misunderstand.
You can find attached a sample example that includes:
Best wishes,
Ivo
the Telerik team
We are sorry for the misunderstand.
You can find attached a sample example that includes:
- Custom appointment
- Custom EditAppointmentDialog
- Validation
- Custom AppointmentItemContentTemplate
- Lightswitch
Best wishes,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Daniel Varrin
Top achievements
Rank 1
answered on 20 Oct 2011, 12:35 PM
Thank you so much Ivo for the sample project!! :D
Exactly what I wanted :-)
Great thanks!
Daniel
Exactly what I wanted :-)
Great thanks!
Daniel
0
Qloud Pty Ltd
Top achievements
Rank 1
answered on 09 Nov 2011, 08:54 PM
Hi Ivo,
Thank You. Great Example with complete code. We are facing few errors when converting in to VB using Telerik Converter.
How to add a label next to Products dropdown?
could you please provide VB code ASAP.
Best Regards
Rama
Thank You. Great Example with complete code. We are facing few errors when converting in to VB using Telerik Converter.
How to add a label next to Products dropdown?
could you please provide VB code ASAP.
Best Regards
Rama
0
Hi Rama,
You can find the VB example attached.
Kind regards,
Ivo
the Telerik team
You can find the VB example attached.
Kind regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Cliff McManus
Top achievements
Rank 1
answered on 20 Dec 2011, 10:03 PM
This is really good stuff. Thanks for the examples.
I however am still having a problem. I would like to add buttons to the ScheduleView control to do things.
I have the XAML from the examples I can get things to show up but cannot for the life of me figure out how to integrate the Custom Appointment logic to implement clicks for things like the Today button. I assume that I need to set up a View Model for this, it is complicated by the fact that I am using LightSwitch as the development platform.
Could you please provide a sample using Lightswitch that includes a radribbon bar.
Regards
Cliff
I however am still having a problem. I would like to add buttons to the ScheduleView control to do things.
I have the XAML from the examples I can get things to show up but cannot for the life of me figure out how to integrate the Custom Appointment logic to implement clicks for things like the Today button. I assume that I need to set up a View Model for this, it is complicated by the fact that I am using LightSwitch as the development platform.
Could you please provide a sample using Lightswitch that includes a radribbon bar.
Regards
Cliff
0
Hi,
You can find an example with RadScheduleView and RadRibbonView in LightSwitch attached. The key thing you missed was the ViewModel as you suspected.
Regards,
Ivo
the Telerik team
You can find an example with RadScheduleView and RadRibbonView in LightSwitch attached. The key thing you missed was the ViewModel as you suspected.
Regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Qloud Pty Ltd
Top achievements
Rank 1
answered on 24 Dec 2011, 01:06 AM
Hi Ivo,
The example was unable to load categorize and Time markers. groub by Functionality is now working.
Please find the attached sceen shot for your reference.
Regards
Rama
The example was unable to load categorize and Time markers. groub by Functionality is now working.
Please find the attached sceen shot for your reference.
Regards
Rama
0
Hi Rama,
It seems you are missing content templates for the categories and time markers. Please, add a header template to your RadMenuItems in the following manner:
And the templates:
I hope this helps.
Regards,
Dani
the Telerik team
It seems you are missing content templates for the categories and time markers. Please, add a header template to your RadMenuItems in the following manner:
<
telerik:RadMenuItem
HeaderTemplate
=
"{StaticResource CategoryHeaderTemplate}"
Command
=
"{Binding SetCategoryCommand, Source={StaticResource ViewModel}}"
CommandParameter
=
"{Binding Header, RelativeSource={RelativeSource Self} }"
>
...
</
telerik:RadMenuItem
>
And the templates:
<
DataTemplate
x:Key
=
"CategoryHeaderTemplate"
>
<
TextBlock
Text
=
"{Binding DisplayName}"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"TimeMarkerHeaderTemplate"
>
<
TextBlock
Text
=
"{Binding TimeMarkerName}"
/>
</
DataTemplate
>
I hope this helps.
Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Cliff McManus
Top achievements
Rank 1
answered on 28 Dec 2011, 03:54 PM
Thanks for the sample. I am sure I can get it to work with this.
I downloaded the sample and changed the references in Client and ClientGenerated to point to my copy of the Telerik DLLS.
However i am getting the following errors . I am pretty new to development so it is probably an easy fix. Both are in the
I downloaded the sample and changed the references in Client and ClientGenerated to point to my copy of the Telerik DLLS.
However i am getting the following errors . I am pretty new to development so it is probably an easy fix. Both are in the
public partial class RadScheduleViewControl : System.Windows.Controls.UserControl Class File
Error 1 The type or namespace name 'RadScheduleView' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Cliff\Desktop\Lightswitch Training\Telerick\ScheduleViewWithViewModel\Client\obj\Debug\RadScheduleViewControl.g.i.cs 40 18 Client
Error 2 Metadata file 'C:\Users\Cliff\Desktop\Lightswitch Training\Telerick\ScheduleViewWithViewModel\Client\Bin\Debug\RadScheduleViewLightSwitch.Client.dll' could not be found ClientGenerated
Could you point me in the right direction.
Thanks
Cliff
0
jim
Top achievements
Rank 1
answered on 02 Jan 2012, 07:48 PM
Thanks for the great examples.
What do i need to do to get recurrence exceptions to be stored in the database also? I cant seem to find an example with this feature.
What do i need to do to get recurrence exceptions to be stored in the database also? I cant seem to find an example with this feature.
0
Hi,
Cliff, could you please tell me what Telerik DLLs do you reffer into your Client and ClientGenerated projects? It seems you missed one of the required DLLs for the RadScheduleView. It requeries these:
Jim, exception appointments are not supported at this moment in RadScheduleView for LightSwitch.
Kind regards,
Ivo
the Telerik team
Cliff, could you please tell me what Telerik DLLs do you reffer into your Client and ClientGenerated projects? It seems you missed one of the required DLLs for the RadScheduleView. It requeries these:
- Telerik.Windows.Controls
- Telerik.Windows.Controls.Input
- Telerik.Windows.Controls.Navigation
- Telerik.Windows.Controls.ScheduleView
- Telerik.Windows.Data
Jim, exception appointments are not supported at this moment in RadScheduleView for LightSwitch.
Kind regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Cliff McManus
Top achievements
Rank 1
answered on 03 Jan 2012, 02:49 PM
Excellent example. Thanks for te quick response this solved my problem.
Cheers Cliff
Cheers Cliff
0
Supreet
Top achievements
Rank 1
answered on 01 Mar 2012, 07:40 PM
Hello Telerik,
Can you please show us a small demo on how to use Context Menu with RadScheduleView for lightswitch to create menus as shown in the attached screen shot.
This context menu should appear when right clicked on an appointment in Schedule View..
Any help would really be appreciated.
Thanks
Supreet
Can you please show us a small demo on how to use Context Menu with RadScheduleView for lightswitch to create menus as shown in the attached screen shot.
This context menu should appear when right clicked on an appointment in Schedule View..
Any help would really be appreciated.
Thanks
Supreet
0
Hello,
You can find an example with RadScheduleView and RadContextMenu with the described functionality attached.
Greetings,
Ivo
the Telerik team
You can find an example with RadScheduleView and RadContextMenu with the described functionality attached.
Greetings,
Ivo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Swapnil
Top achievements
Rank 1
answered on 11 Jul 2013, 05:12 PM
Is there any way to restrict the appointment from getting highlighted when a user clicks on any appointment ?
I mean I have certain scenarios in which nothing should happen when a user clicks on the appointment. Can I make use of a Boolean converter in order to prevent this selection ?
I mean I have certain scenarios in which nothing should happen when a user clicks on the appointment. Can I make use of a Boolean converter in order to prevent this selection ?
0
Hi,
In order to achieve similar behavior you will have to create a new class derived from AppointmentSelectionBehavior and override the GetSelectedAppointments method. If you override and return Enumerable.Empty<IOccurrence>() into this method you would disable the selection of RadScheduleView.
Regards,
Ivo
Telerik
In order to achieve similar behavior you will have to create a new class derived from AppointmentSelectionBehavior and override the GetSelectedAppointments method. If you override and return Enumerable.Empty<IOccurrence>() into this method you would disable the selection of RadScheduleView.
public
class
CustomAppointmentSelectionBehavior : AppointmentSelectionBehavior
{
protected
override
System.Collections.Generic.IEnumerable<IOccurrence> GetSelectedAppointments(AppointmentSelectionState state, IOccurrence target)
{
return
Enumerable.Empty<IOccurrence>();
}
}
<
telerik:RadScheduleView
Appointments
=
"{Binding Appointments}"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
/>
<
telerik:TimelineViewDefinition
/>
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.AppointmentSelectionBehavior
>
<
local:CustomAppointmentSelectionBehavior
/>
</
telerik:RadScheduleView.AppointmentSelectionBehavior
>
</
telerik:RadScheduleView
>
Regards,
Ivo
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>