This is a migrated thread and some comments may be shown as answers.

how to use button click event on Schedule View

8 Answers 133 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Manjuboyz
Top achievements
Rank 1
Manjuboyz asked on 09 Oct 2014, 12:30 PM
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 :)

8 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 09 Oct 2014, 01:05 PM
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.

 
0
Manjuboyz
Top achievements
Rank 1
answered on 13 Oct 2014, 04:02 AM
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)
0
Kalin
Telerik team
answered on 13 Oct 2014, 11:03 AM
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.

 
0
Kalin
Telerik team
answered on 13 Oct 2014, 11:06 AM
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.

 
0
Manjuboyz
Top achievements
Rank 1
answered on 13 Oct 2014, 11:15 AM
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 ??
0
Kalin
Telerik team
answered on 14 Oct 2014, 09:00 AM
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.

 
0
Manjuboyz
Top achievements
Rank 1
answered on 14 Oct 2014, 09:17 AM
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).

0
Kalin
Telerik team
answered on 15 Oct 2014, 08:13 AM
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.

 
Tags
ScheduleView
Asked by
Manjuboyz
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Manjuboyz
Top achievements
Rank 1
Share this question
or