Appointment.isAllDay protected?

11 posts, 1 answers
  1. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 14 Jun 2010 Link to this post

    I don't get it. I want to read/write appointment data from a database, and get/set IsAllDay. Sure, I can check that the start is 00:00:00 and that the end is 23:59:59 on the same date, but what kind of kludge is that?

    What reason is there to protect this property?
  2. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 17 Jun 2010 Link to this post

    Hello Jim Benson,

    Thank you for writing.

    Indeed, this is by design, the reason being that this property is always set to true when  the appointment is equal or longer than a day. In a future release we may change the behavior in case we get more requests about it.
      

    All the best,
    Dobry Zranchev
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 17 Jun 2010 Link to this post

    Thanks for your response! Supposing that user feedback drives your development, I'll make my point.

    The Edit Appt Dialog has the "All day event" checkbox. I have a corresponding column in the database table where I store appointments. It seems that the only uncooperative piece is the Appointment class itself. To me, it seems that either IsAllDay is an Appointment property, or it is not. If it is, then setting it based on the start and end times is a work-around - one that has been designed into the product.

    I'll leave the subject alone now. My point of view is not always in agreement with that of other users, and I am not always the first to catch onto something. I'm just telling you what I presently perceive.
  5. Answer
    Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 23 Jun 2010 Link to this post

    Hello Jim Benson,

    Thank you for feedback me.

    As we are close to the official release date of Q2 2010, we will not be able to make the necessary tests for the exposed AllDay property, so most probably we will make this property public in Q3 2010. Meanwhile, you can use the following code snippet in order to access the isAllDay member:
    class CustomAppointment : Appointment
    {
        public bool AllDay
        {
            get
            {
                return this.isAllDay;
            }
            set
            {
                if (this.isAllDay != value)
                {
                    if (value)
                    {
                        this.end = DateHelper.GetEndOfDay(this.start);
                    }
     
                    this.isAllDay = value;
                }
            }
        }
    }

    Your Telerik points have been updated for yoru feedback. I hope this will help you.

    All the best,
    Dobry Zranchev
    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
  6. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 23 Jun 2010 Link to this post

    Thanks for the support!
  7. Xavier Soares
    Xavier Soares avatar
    39 posts
    Member since:
    Jun 2008

    Posted 04 Jan 2011 Link to this post

    Hello,

    How can  I Activate this behaviour?

    I've created a new class

    <i>Public Class CustomAppointment<br>
        Inherits Appointment<br>
        Public Property AllDay() As Boolean<br>
            Get<br>
                Return Me.isAllDay<br>
            End Get<br>
            Set(ByVal value As Boolean)<br>
                If Me.isAllDay <> value Then<br>
                    If value Then<br>
                        Me.[End] = DateHelper.GetEndOfDay(Me.Start)<br>
                    End If<br>
    <br>
                    Me.isAllDay = value<br>
                End If<br>
            End Set<br>
        End Property</i>


    But now I don't now how to use this new class in my app.

    Best regards,
    Maurício
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Jan 2011 Link to this post

    Hello Luis,

    Please have a look at this documentation which will inform you how to implement and use a custom appointment.
    Hope that helps
    Richard
  9. Xavier Soares
    Xavier Soares avatar
    39 posts
    Member since:
    Jun 2008

    Posted 04 Jan 2011 Link to this post

    Hi Richard,

    Thanks for Your repply.

    I don't think this solves my problem. I just need to associate a bit column (IsAllDayEvent) in my sql server to the AllDay property of RadScheduler.

    In SQL Server the columns are True/1 but in RadScheduler the checkbox of All day is always cleared when I run the app! I've defined the AllDay property correctly in Edit Appointment Mapping but never workers!!!

    Any sugestion?

    Best regards
  10. Xavier Soares
    Xavier Soares avatar
    39 posts
    Member since:
    Jun 2008

    Posted 04 Jan 2011 Link to this post

    Nevermind. I've added 24 hours to my End Date and now works great...

    Best regards
  11. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Jan 2011 Link to this post

    Glad you have this working now.
    Regards,
    Richard
  12. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 06 Jan 2011 Link to this post

    Hi Luis,

    Thank you for writing.

    I am happy that you have found a solution. This is the correct approach to make an all day appointment.

    If you have any additional questions, feel free to write back.

    All the best,
    Dobry Zranchev
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top
UI for WinForms is Visual Studio 2017 Ready