How to display custom data driven weeks

6 posts, 0 answers
  1. Maurice
    Maurice avatar
    11 posts
    Member since:
    Feb 2014

    Posted 31 Oct Link to this post

    We are showing a timebar that represents a customers budget weeks which can start (WK 1) on any day in the year and are also not always 52 WKs/12 months.

    It appears a formatter provider is not the correct approach as the weeks are not bindable, hence the delay to get them from a webservice means the data is not available when the provider is calling its format and interval requests.

    Is this achievable?

    Thanks,
    Maurice

  2. Dinko
    Admin
    Dinko avatar
    458 posts

    Posted 03 Nov Link to this post

    Hello Maurice,

    Thank you for your interest in RadTimeBar control.

    I am not sure that I have fully understood your approach. Can you elaborate more on your final behavior? You can send me a sample picture of the final behavior or any other additional information which you think will be helpful.

    In addition, you can take a look at the MVVM Support help article in our documentation. Also, you can consider implementing Custom Interval Types which could help you in your final behavior.

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Maurice
    Maurice avatar
    11 posts
    Member since:
    Feb 2014

    Posted 03 Nov in reply to Dinko Link to this post

    Hi Dinko,

    The crux of the issue is I am trying to find the property (or properties) to bind to (I am using MVVM) for the week labels will update based on my data rather than being based on ISO Week Numbers. For example week 1 might start on March 23.

    At the moment I cannot identify which property this is bound to so that once my week interval data (start date, stop date and week label) arrives from the web service the week numbers are updated accordingly.

    I currently using a FormatterProvider on the WeekInterval but I need to have my week data available inside the provider to identify the week labels. I tried extending DependencyObject in the provider and binding to the week data, but the formatters are called before the data arrives, so when the formatter is executing in the provider my data is not available to work out what the label is for the given date.

     

    Regards,

    Maurice

     

  4. Dinko
    Admin
    Dinko avatar
    458 posts

    Posted 08 Nov Link to this post

    Hi Maurice,

    The first-week label depends on the PeriodStart property. I have created sample MVVM project in which I have bound the PeriodStart, PeriodEnd, VisiblePeriodStart, VisiblePeriodEnd. Also, I have created custom WeekFormatterProvider in which I have changed the label to be displayed as Week {number}. Can you take a look at this project and let me know if it works for you. Also, you can change the visible area by binding the VisiblePeriodStart and VisiblePeriodEnd properties. 

    If this is not the case, can you elaborate more on your scenario using the attached project? 

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  5. Maurice
    Maurice avatar
    11 posts
    Member since:
    Feb 2014

    Posted 08 Nov in reply to Dinko Link to this post

    Hi Dinko,

    Thanks for the follow-up, what you have is what I am currently doing.Due to tight deadlines, I have managed a workaround. If I get some time I will prepare an update to your code to demonstrate what I was trying to achieve.

    Regards,
    Maurice

  6. Dinko
    Admin
    Dinko avatar
    458 posts

    Posted 13 Nov Link to this post

    Hi Maurice,

    Please, take your time to prepare the sample application. I will be awaiting your reply whenever you are able to provide such, so I can assist you further. 

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top