Appointment with IsReadOnly property

9 posts, 1 answers
  1. Björn
    Björn avatar
    23 posts
    Member since:
    Mar 2011

    Posted 04 Mar 2012 Link to this post

    Appointment with IsReadOnly property: don't allow to edit, delete and drag&drop

    Depending on different rules, an appointment can be read only (in the same slot there can be both: an editable and a readonly appointment).
    There exists no 'IsReadOnly' property in the RadScheduleView for this situation.
    Can you send a sample how to implement that in a easy way?
    - disable the DeleteButton, PART_StartResizeGrip, PART_EndResizeGrip in the AppointmentItemXControlTemplate
    - avoid any drag&drop
    - open appointment dialog window in readonly mode

    Thanks
    Björn.
  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 09 Mar 2012 Link to this post

    Hello Björn,

    I would suggest to create a custom appointment with custom IsReadOnly property as explained in this article.

    As to the other requirements:

    - In order to achieve this you need to edit the AppointmentItem's ControlTemplates. Using the AppointmentStyleSelector you have to edit the AppointmentItemHorizontalControlTemplate and AppointmentItemVerticalControlTemplate and remove the button.  More information how to use the AppointmentStyleSelector you can find in this help article.
    - you should customize the DragDropBehavior of RadScheduleView, check here for more details.
    - I would suggest to cancel AppointmentEditing event for read-only appoinments, more info about events of RadScheduleView you can check here.

    Hope this helps.

    Regards,
    Yana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Björn
    Björn avatar
    23 posts
    Member since:
    Mar 2011

    Posted 14 Mar 2012 Link to this post

    Thanks Yana
    It would be nice if this functionality is supported in the feature.
    Björn.
  5. Yi
    Yi avatar
    15 posts
    Member since:
    Jul 2013

    Posted 28 Oct 2013 Link to this post

    we usually use TemplateBinding  in controlTemplate.
    i don't know how use binding property in controlTemplate.

    give me a demo?
  6. Yi
    Yi avatar
    15 posts
    Member since:
    Jul 2013

    Posted 30 Oct 2013 Link to this post

    we usually use TemplateBinding  in controlTemplate.
    i don't know how use binding property in controlTemplate.

    give me a demo?
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 30 Oct 2013 Link to this post

    Hi Yi,

    Could you please give us more details on your exact scenario, so we to be able to provide proper assistance?

    Looking forward to your reply.

    Regards,
    Yana
    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 >>
  8. Yi
    Yi avatar
    15 posts
    Member since:
    Jul 2013

    Posted 31 Oct 2013 Link to this post

    i add the SchuleView Theme to my project.
    and the controlTemple Binding like:
    <telerik:RadComboBox x:Name="PART_TimeMarkers"
                                             Margin="2 1"
                                             Width="110"
                                             IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             ClearSelectionButtonVisibility="Visible"
                                             ClearSelectionButtonContent="Clear All"
                                             EmptyText="TimeMarkers
    "
                                             ItemsSource="{Binding TimeMarkers}"
                                             SelectedItem="{Binding Occurrence.Appointment.TimeMarker, Mode=TwoWay}"
                                             ItemTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}"
                                             SelectionBoxTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}"
                                             telerik:StyleManager.Theme="{StaticResource Theme}"/>
    for example: i follow the demo project,and binding the ItemsSource successfully. but how can i make the RadComboBox has default value? set the SelectedIndex seems to not use. and how to binding IsEnabled property.which palace i can set the value. and how to ClearSelectionButtonContent Property to localization? 
    sorry that i am a fresher.
    thank you.
  9. Yi
    Yi avatar
    15 posts
    Member since:
    Jul 2013

    Posted 31 Oct 2013 Link to this post

    i add the SchuleView Theme to my project.
    and the controlTemple Binding like:
    <telerik:RadComboBox x:Name="PART_TimeMarkers"
                                             Margin="2 1"
                                             Width="110"
                                             IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             ClearSelectionButtonVisibility="Visible"
                                             ClearSelectionButtonContent="Clear All"
                                             EmptyText="TimeMarkers
    "
                                             ItemsSource="{Binding TimeMarkers}"
                                             SelectedItem="{Binding Occurrence.Appointment.TimeMarker, Mode=TwoWay}"
                                             ItemTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}"
                                             SelectionBoxTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}"
                                             telerik:StyleManager.Theme="{StaticResource Theme}"/>
    for example: i follow the demo project,and binding the ItemsSource successfully. but how can i make the RadComboBox has default value? set the SelectedIndex seems to not use. and how to binding IsEnabled property.which palace i can set the value. and how to ClearSelectionButtonContent Property to localization? 
    sorry that i am a fresher.
    thank you.
  10. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 05 Nov 2013 Link to this post

    Hello Yi,

    I noticed you have opened this forum thread with the same question. So I will ask you to continue the conversation in the other thread as I already answered you there.

    Regards,
    Kalin
    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 >>
Back to Top
DevCraft banner