RadScheduleView + TimeBar bind to ViewModel

1 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 19 Mar 2012 Link to this post

    Hi @ All,

    is there any tutorial how to bind a viewmodel to a TimeBar + ScheduleVIew? In the Demo of telerik there is the DataContext generated in xaml.

    <UserControl.DataContext>
        <example:RandomGeneratorViewModel RandomSeed="123" StartTime="1/1/2011 12:00:00 AM"
                EndTime="12/31/2011 11:59:59 PM" CurrentTime="6/5/2011 10:00:00 AM">
            <example:RandomGeneratorViewModel.Lipsum>Pellentesque dapibus congue neque, eu bibendum dui elementum sed. Integer porta suscipit venenatis. Quisque gravida, est in eleifend dignissim, sapien dui euismod erat, pulvinar eleifend leo risus sit amet massa. Suspendisse sit amet metus ut lorem hendrerit molestie sed eu justo. Mauris eu tristique ipsum. Vivamus sodales venenatis nibh quis suscipit. Nulla facilisi. Pellentesque purus risus, hendrerit at venenatis sit amet, fringilla et arcu. Donec luctus tincidunt iaculis. Integer sapien tortor, lacinia et mattis vitae, facilisis at massa. Vestibulum scelerisque euismod posuere. Etiam sed velit non velit hendrerit rutrum eget sed risus. Nullam blandit congue dapibus. Nullam risus velit, pretium vel pretium eu, bibendum in urna. Fusce non nulla eros, eu placerat mauris. Aenean lobortis vehicula mi, ac molestie nisi ornare dictum. Etiam nec dolor nisi. Mauris eleifend lacus vitae felis eleifend eget fringilla sem ultricies. Duis hendrerit dapibus consectetur. Phasellus ac lacus felis, quis pharetra risus. Donec enim magna, sollicitudin vitae dignissim sed, scelerisque quis leo. In hac habitasse platea dictumst. In eu purus augue, vel scelerisque velit. Vivamus nec magna ipsum. Donec porta tellus ac arcu congue pulvinar. Maecenas non tortor orci. In eu erat justo, ac pellentesque urna. Mauris rutrum arcu quis dui tincidunt semper. Aliquam ullamcorper nunc est. Proin suscipit faucibus varius. Quisque suscipit felis ut dolor rutrum convallis. In felis augue, interdum consequat lacinia id, dictum sit amet nisl. Vivamus adipiscing sodales quam, et suscipit mi adipiscing sollicitudin. Vestibulum volutpat dui in massa scelerisque accumsan. Proin ac odio non nisi ornare semper. Morbi sapien ante, pulvinar quis lobortis in, viverra porttitor lorem. Aenean pellentesque euismod risus eu porttitor. Donec lobortis volutpat suscipit.</example:RandomGeneratorViewModel.Lipsum>
            <example:RandomGeneratorViewModel.Controls>RadComboBox, RadScheduleView, RadNumericUpDown, RadGridView, RadDocking, RadWindow, RadCharting, RadTimeBar, RadPanelBar, RadRibbonView, RadExpander</example:RandomGeneratorViewModel.Controls>
            <example:RandomGeneratorViewModel.Actions>Bug, Feature, Help Article, Forum Post, Unit Test</example:RandomGeneratorViewModel.Actions>
            <example:RandomGeneratorViewModel.ResourceTypes>
                <telerik:ResourceType Name="Developer" DisplayName="Developer">
                    <telerik:Resource DisplayName="John" ResourceName="John" />
                    <telerik:Resource DisplayName="Smith" ResourceName="Smith" />
                    <telerik:Resource DisplayName="Bella" ResourceName="Bella" />
                    <telerik:Resource DisplayName="Bob" ResourceName="Bob" />
                    <telerik:Resource DisplayName="Patrick" ResourceName="Patrick" />
                    <telerik:Resource DisplayName="Simone" ResourceName="Simone" />
                    <telerik:Resource DisplayName="Mike" ResourceName="Mike" />
                    <telerik:Resource DisplayName="Jane" ResourceName="Jane" />
                </telerik:ResourceType>
            </example:RandomGeneratorViewModel.ResourceTypes>
        </example:RandomGeneratorViewModel>
    </UserControl.DataContext>

    How do i transfer this to a dynamic Databin? Problem is how to set the ResourceType and the Resource?! Background. I want to load the data from sqlite-database. Each Customer is a Resource. n the future i want to use 3 ResourceTypes with n Resources!

    Thanks
    WW
Back to Top