how to use button click event on Schedule View

9 posts, 0 answers
  1. Manjuboyz
    Manjuboyz avatar
    9 posts
    Member since:
    Aug 2014

    Posted 09 Oct 2014 Link to this post

    Hi

      I don't know what I am asking is can be done, but have to try a shot, Currently using Schedule view for my project, and on that as you people know there is Day,Week,Month and timeline option on it, what I am expecting is, can Onclick event can be done  on "Day" or "week" so that  it can trigger method in viewmodel(class file) currently this click option is nothing to do with Viewmodel, the reason I need this because, if employee has an many appointments Ex 1000, it takes time to load all the 1000 values,so what I need is on page load it should show only todays appointments, on selection of "Week" it should call a method and pass the week parameters to get only week's appointment and so on, I want to get appointment based on selection of Day or Month it has to load only based on that Selection event, not the entire future appointment list, hope I made it understand , Please let me know for any clarification, and I am attaching the pic of existing view of mine, so please guide me in this, any help is appreciated, thanks :)
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 09 Oct 2014 Link to this post

    Hello Manjuboyz,

    What I can suggest you would be to check the Load on demand article from our online help documentation. The second section of the article (Using the VisibleRangeChangedCommand) demonstrates how the bind the VisibleRangeChangedCommand to a command in the ViewModel and pass the current visible range. Afterward depending on the current visible range you would be able to load only the needed appointments.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Manjuboyz
    Manjuboyz avatar
    9 posts
    Member since:
    Aug 2014

    Posted 12 Oct 2014 in reply to Kalin Link to this post

    Thanks for your Reply, could I able to get any small Demo Example on this??!, so that I can get clear picture like how it works, and Yes me working on MVVM architecture(Silverlight)
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 13 Oct 2014 Link to this post

    Hello Manjuboyz,

    You can find attached a sample project demonstrating the exact approach of using the VisibleRangeChangedCommand. However after having the current VisibleRange you would need to implement the custom loading logic.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 13 Oct 2014 Link to this post

    Hello,

    I just noticed you actually needed a Silverlight project and I attached WPF one. However the approach demonstrated in the project can be used for Silverlight as well without a problem.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Manjuboyz
    Manjuboyz avatar
    9 posts
    Member since:
    Aug 2014

    Posted 13 Oct 2014 in reply to Kalin Link to this post

    thanks for your reply

      However I downloaded the project and tried to run on my VS 2013( frame work 4.5.50938) its generating error message( as shown in pic), I have one more clarification like I have give main project as startup page, but even though the Run Sign still shows as 'Start' what am I missing to run this, project ??
  8. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 14 Oct 2014 Link to this post

    Hi,

    I'm reattaching a sample project for Silverlight this time. Please check it and let me know if you are able to successfully run it (you would just need to reference the correct binaries).

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Manjuboyz
    Manjuboyz avatar
    9 posts
    Member since:
    Aug 2014

    Posted 14 Oct 2014 in reply to Kalin Link to this post

    Hi Kalin


     Thanks for your reply, I have one last clarification, demo project is executing fine, please find the attached image of my query, what if i selected week button i.e. EX. 1st - 7th october, then how the parameter is passed is it a single parameter or 2 parameters (1st & 7th).

  10. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 15 Oct 2014 Link to this post

    Hi,

    The DateSpan object provides two properties - Start and End. Using those properties you will be able to get start and the end of the VisibleRange and load the needed Appointments. Check the attached screen shot that demonstrates how the DateSpan object looks whenever the VisibleRange is one week.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready