SelectableDateEnd not changing when databound type is changed.

4 posts, 0 answers
  1. Odd Veibust
    Odd Veibust avatar
    26 posts
    Member since:
    Feb 2007

    Posted 24 Aug 2009 Link to this post

    Hi.

    I have two RadDatePickers, one for datestart and one for dateend, each is databound on the selecteddate property to a datetime variable. This works as it should, but since I do not want the user to be able to select a startdate that is greater then the enddate, and vica verca, I have databound the SelectableDateEnd and SelectableDateStart to the opposite variables. This works fine for the SelectableDateStart property, but doesn't seem to work on the SelectableDateEnd. Can you check and verify if this is a bug or not?  It works fine on initiation, but not when the datatype is changed, so it doesn't seem to pick up the PropertyChangedEvent fireing.

    I have also checked that the PropertyChengedEvent is firing on the change of the DateEnd property, and it does.

    Thanx in advance.
    - Odd

    Code:

     

     

    <telerikInput:RadDatePicker x:Name="startDate" Width="150"

     

     

    SelectedDate="{Binding InvoiceSearch.DateStart, Mode=TwoWay}"

     

     

    SelectableDateEnd="{Binding InvoiceSearch.DateEnd, Mode=TwoWay}"></telerikInput:RadDatePicker>

     

     

     


    <
    telerikInput:RadDatePicker x:Name="endDate" Width="150"

     

     

    SelectedDate="{Binding InvoiceSearch.DateEnd, Mode=TwoWay}"

     

     

    SelectableDateStart="{Binding InvoiceSearch.DateStart, Mode=TwoWay}"></telerikInput:RadDatePicker>

     

  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 26 Aug 2009 Link to this post

    Hi Odd Veibust,

    We are sorry for any inconvenience caused. We have tried to reproduce the described issue but without a success. I am attaching a sample project, that is close to your solution. You can check weather it is working for you. Also make sure you have downloaded the latest release(Latest internal build).

    Regards,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Tom
    Tom avatar
    7 posts
    Member since:
    Jun 2009

    Posted 09 Mar 2010 Link to this post

    I have been experiencing the same problem described here.  We're using the CSLA framework for our business logic layer.  The problem seems to be something to do with the OnPropertyChanged notification in CSLA.  The SelectableDateStart attribute of the second RadDatePicker is bound (one-way) to the StartDate property of the business object (inherits from Csla.BusinessBase<T>).  This SelectedDate attribute of the first RadDatePicker is also bound (two-way) to this property.  The property is defined as:

            protected static PropertyInfo<DateTime> StartDateProperty = RegisterProperty<DateTime>(p => p.StartDate, "Start Date", DateTime.Now);
            public DateTime StartDate 
            { 
                get { 
     
                    return GetProperty(StartDateProperty); 
                } 
                set 
                { 
                    SetProperty(StartDateProperty, value); 
                } 
            } 

    When the SelectedDate of the first RDP is changed it doesn't seem notify the SelectableDateStart of the second RDP.

    Strangely changing the default value of the business object property to DateTime.Now.Date seems to fix the problem..
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 11 Mar 2010 Link to this post

    Hi Tom,

    Thank you for contacting us.

    It seems that everything should work as expected. Could you please try modifying the binding of the second RadDatePicker to TwoWay.
    If that doesn't resolves your problem could you please send us a sample running project, which we can test here locally in order to assist you in the best manner.

    Looking forward to your reply.

    Best wishes,
    Konstantina
    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.
Back to Top