the slider of RadTimeBar won't move

4 posts, 1 answers
  1. Xiaojun
    Xiaojun avatar
    7 posts
    Member since:
    Nov 2011

    Posted 18 Jan 2012 Link to this post

    PeriodEnd and PeriodStart are bound from VM, the silder of RadTimeBar won't move.
    If they are coded in xaml file, it works. Why?
    Product version is 2011.2.0712.1040
    it didn't work.
                                    view:RadTimeBarProperty.StartDate="{Binding PeriodStart, Mode=OneWay}"
                                    view:RadTimeBarProperty.EndDate="{Binding PeriodEnd, Mode=OneWay}"
    it didn't work.
                                    PeriodStart="{Binding PeriodStart, Mode=TwoWay}"
                                    PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}"
    it did work.
                                    PeriodEnd="2012-1-9"
                                    PeriodStart="2005-5-19"
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Jan 2012 Link to this post

    Hi,

    Ineed, we had such problems with previous versions of the control, but these were fixed for Q2 2011 - the version that you use. I tried to reproduce the problem you describe locally, but to no avail. Please find my test code attached. Could you please prepare and send me a simple running project, demonstrating the problem? 

    All the best,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Xiaojun
    Xiaojun avatar
    7 posts
    Member since:
    Nov 2011

    Posted 20 Jan 2012 Link to this post

    Date is to be asynchronous. I can not upload attachments, so I use a button to simulate the asynchronous call.
    xaml
    <Grid x:Name="LayoutRoot" Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <telerik:RadTimeBar x:Name="RadTimeBar1"
                                PeriodStart="{Binding PeriodStart, Mode=TwoWay}"
                                PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}">
                <telerik:RadTimeBar.Intervals>
                    <telerik:MonthInterval />
                    <telerik:YearInterval />
                </telerik:RadTimeBar.Intervals>
            </telerik:RadTimeBar>
            <!-- I added these -->
            <Button Content="Test"
                    Grid.Row="1"
                    Click="Button_Click" />
        </Grid>
    cs
    public ChangingProperties()
            {
                InitializeComponent();
     
                RadTimeBar1.DataContext = this;
     
                // I removed these
                //this.PeriodEnd = new DateTime(2012, 1, 9);
                //this.PeriodStart = new DateTime(2005, 5, 19);
            }
    // I add these
            private void Button_Click(object sender, RoutedEventArgs e)
            {
                this.PeriodEnd = new DateTime(2012, 1, 9);
                this.PeriodStart = new DateTime(2005, 5, 19);
            }

  5. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 24 Jan 2012 Link to this post

    Hello,

    I updated my test page with the code that you posted and I was able to reproduce the problem with the 2011.2.0712.1040 version of the suite. This problem is fixed in the 2011.2.920.1040 version. That is why, in case you upgrade to Q2 2011 SP1 or a later version, the problem should be fixed.

    Regards,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top