Update Start/End DateTime in ToolTip

6 posts, 0 answers
  1. Lucie
    Lucie avatar
    28 posts
    Member since:
    Jun 2011

    Posted 02 Feb 2012 Link to this post

    I have inside ToolTip for Appointment line

    <TextBlock Text="{Binding Path=Appointment, Converter={StaticResource DateFormatConverter}}" />

    to format both DateTime value (Start and End) in format what is suitable for our application.

    It works after loading of Appointments, but after update Start/End in application form or by dragging is not called Converter to refresh Tooltip.

    I have tried many variants but not any was successful.

     

    Then I download example 314907_ScheduleView-CustomToolTip and modify ToolTip

     

    <ToolTipService.ToolTip>
      <ToolTip>
        <Grid>
          <Border Background="LightBlue" MinWidth="100" Margin="-20 -4" Padding="5">
            <StackPanel Orientation="Vertical">
              <TextBlock Text="{Binding Subject}" />
              <TextBlock Text="{Binding Path=Appointment}" />
            </StackPanel>
          </Border>
        </Grid>
      </ToolTip>
    </ToolTipService.ToolTip>

     

     

    In second line is default conversion of Appointment which includes DateTime of Start and End.

    After dragging to another day is tooltip not changed as in my application. See images.

     I think Tooltip is generated only one times.


    I previously use RadScheduler where was reference to Appointment in form 
    Path=Occurrence.Appointment

    and it works fine without problem.

     

    What I shell to do in ScheduleView to update Start and End values in Tooltip?

     

    Regards

     

  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Feb 2012 Link to this post

    Hello Jana,

    Could you please share with us some more code and details about your application and the implementation of the ToolTip to the ScheduleView? Do you use custom appointment?
    If you could send us your project so that we can run and debug it here, it will be really helpful for tracking down the problem in a timely manner.

    Looking forward to your reply.

    Regards,
    Konstantina
    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. Lucie
    Lucie avatar
    28 posts
    Member since:
    Jun 2011

    Posted 10 Feb 2012 Link to this post

    Hello Konstantina,
    you can modify project ScheduleView-CustomToolTip what somebody from Telerik attach to reply in ScheduleView thread
     "Custom Tooltip Display" (posted on Nov 17, 2011).
    When you modify tooltip, as I wrote in my first email, you will see that after drag/grop appoinment is tooltip
    not modified.
    Appointment was moved from 10.2.2012 to 12.2.2012 (ScheduleView displays DateTime by local setting in notation
    dd.mm.YYYY). See attachments.

    regards

    (By the way I cannot put email address for sending of copy you replies. Du ou know why it was removed from forum?)
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 15 Feb 2012 Link to this post

    Hi Jana,

    In order the ToolTip to update its value you need to bind it like so:

    <TextBlock Text="{Binding Start}" />

    You don't need a Converter, just bind to the Start property. The ToolTip was not updating, as the Appointment itself was not changed, but its Start property.

    Hope this helps.

    Kind regards,
    Konstantina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Lucie
    Lucie avatar
    28 posts
    Member since:
    Jun 2011

    Posted 16 Feb 2012 Link to this post

    I need to format Start and End to desired form. So I need both values. These values are included inside of Appointment
    therefore I use whole Appointment in Binding.
    I need to use two values in binding or set Appointment to state changed.
    In Scheduler I have used  binding for Occurrence.Appointment and it works.

    Can you give me a advice how to solve this situation?

    Regards



  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 20 Feb 2012 Link to this post

    Hi,

    If you need the end of the appointment also, you could bind to the End property, the same way as the Start, and using the StringFormat property of the binding to format it according to your requirements.

    Kind regards,
    Konstantina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner