Hi,
My Requirement: I am using WPF RadscheduleView. I have 2 buttons in the bottom of the grid which will be used to navigate prev/next week.
I am using FirstVisibleRange and navigate to next week based on the calculation of next date. The scroll moved to calculated date , but the FirstVisibleRange property of schedule view grid still showing previous date only.
Pls help me out on this. Or let me know the best way to achieve prev and next week navigation in schedule view.
Regards,
Sugumar P
My Requirement: I am using WPF RadscheduleView. I have 2 buttons in the bottom of the grid which will be used to navigate prev/next week.
I am using FirstVisibleRange and navigate to next week based on the calculation of next date. The scroll moved to calculated date , but the FirstVisibleRange property of schedule view grid still showing previous date only.
Pls help me out on this. Or let me know the best way to achieve prev and next week navigation in schedule view.
Regards,
Sugumar P
8 Answers, 1 is accepted
0
Hello Sugumar,
The FirstVisibleTime property of the ScheduleView is used only to set the initial visible time, that is why when you change it afterwards it doesn't work. What I can suggest you in order to achieve the required is to use the CurrentDate property of the ScheduleView this way you will be able to change the current VisibleRange as needed:
Hope this will be helpful.
Regards,
Kalin
Telerik
The FirstVisibleTime property of the ScheduleView is used only to set the initial visible time, that is why when you change it afterwards it doesn't work. What I can suggest you in order to achieve the required is to use the CurrentDate property of the ScheduleView this way you will be able to change the current VisibleRange as needed:
this
.ScheduleView.CurrentDate =
this
.ScheduleView.CurrentDate.AddDays(7);
Hope this will be helpful.
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
Sugumar
Top achievements
Rank 1
answered on 08 Apr 2014, 04:30 PM
Hi Kalin,
Thanks for reply.
Sorry that I have wrongly mentioned the term VisibleRange in my last post. Actually I am using FirstVisibleGroup to get currently focused date. User may do scroll navigation manually. So that, we need to get the currently focused date in the grid.
I tried with current date update, but FirstVisibleGroup always shows previous value.
Pls help me to get currently focused date in the grid. So that, based on the date i can calculate the next date which needs to be focused.
Regards,
Sugumar P
Thanks for reply.
Sorry that I have wrongly mentioned the term VisibleRange in my last post. Actually I am using FirstVisibleGroup to get currently focused date. User may do scroll navigation manually. So that, we need to get the currently focused date in the grid.
I tried with current date update, but FirstVisibleGroup always shows previous value.
Pls help me to get currently focused date in the grid. So that, based on the date i can calculate the next date which needs to be focused.
Regards,
Sugumar P
0
Hello Sugumar,
As well as the FirstVisibleTime, the FirstVisibleGroup is only applied initially and you won't be able to use it afterwards in run time. However could you please share some more detailed information about the exact scenario you want to achieve, so I can provide you with the proper solution? Which ViewDefinition are you using?
I'm looking forward to hearing from you.
Regards,
Kalin
Telerik
As well as the FirstVisibleTime, the FirstVisibleGroup is only applied initially and you won't be able to use it afterwards in run time. However could you please share some more detailed information about the exact scenario you want to achieve, so I can provide you with the proper solution? Which ViewDefinition are you using?
I'm looking forward to hearing from you.
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
Sugumar
Top achievements
Rank 1
answered on 09 Apr 2014, 02:24 PM
Hi Kalin,
I am using week view definition. The date range may loaded with 3 months data. I have 2 buttons below the schedule view which will be used by user to navigate 1 week previous or next. User may scroll manually also. I need to get the current focuses date and need to navigate to next or previous week. How to get current scroll bar position focused date?
Regards,
Sugumar P
I am using week view definition. The date range may loaded with 3 months data. I have 2 buttons below the schedule view which will be used by user to navigate 1 week previous or next. User may scroll manually also. I need to get the current focuses date and need to navigate to next or previous week. How to get current scroll bar position focused date?
Regards,
Sugumar P
0
Hi Sugumar,
Please check the attached sample project - demonstrates how to change the current week using buttons which change the CurrentDate. However if you need to do that depending on the focused slot - you can use the SelectedSlot property of the ScheduleView and modify the CurrentDate depending on SelectedSlot value.
Hope this will help you.
Regards,
Kalin
Telerik
Please check the attached sample project - demonstrates how to change the current week using buttons which change the CurrentDate. However if you need to do that depending on the focused slot - you can use the SelectedSlot property of the ScheduleView and modify the CurrentDate depending on SelectedSlot value.
Hope this will help you.
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
Sugumar
Top achievements
Rank 1
answered on 10 Apr 2014, 10:19 PM
Hi Kalin,
Thanks for the sample app. Unfortunately, this is not resolving my issue.
We are displaying 1year range data in the window, not a 1 week data.
As you suggested, we cant use selected slot since the selected slot will not be changed on manual scrolling and we should not change the selected slot also..
Pls let me know is there any other way to achieve this.
Regards,
Sugumar P
Thanks for the sample app. Unfortunately, this is not resolving my issue.
We are displaying 1year range data in the window, not a 1 week data.
As you suggested, we cant use selected slot since the selected slot will not be changed on manual scrolling and we should not change the selected slot also..
Pls let me know is there any other way to achieve this.
Regards,
Sugumar P
0
Hello Sugumar,
The only solution for the desired scenario would be to get the SelectedSlot and using the ScrollIntoView method of the ScheduleView to scroll to a slot which is located one week ahead and then select it in order to be able to move again a week ahead. Button click handler should look as shown below:
However you will need to make sure you have always SelectedSlot.
Regards,
Kalin
Telerik
The only solution for the desired scenario would be to get the SelectedSlot and using the ScrollIntoView method of the ScheduleView to scroll to a slot which is located one week ahead and then select it in order to be able to move again a week ahead. Button click handler should look as shown below:
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
var slot =
this
.ScheduleView.SelectedSlot;
var newSlot =
new
Slot{ Start = slot.Start.AddDays(7), End = slot.End.AddDays(7)};
this
.ScheduleView.ScrollIntoView(newSlot,
true
);
this
.ScheduleView.SelectedSlot = newSlot;
}
However you will need to make sure you have always SelectedSlot.
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
Sugumar
Top achievements
Rank 1
answered on 16 Apr 2014, 05:15 AM
Hi Kalin,
Thanks for the sample.
but in my case there are lot of logics around selected slot. So I can't change the selected slot for each week navigation.
Regards,
Sugumar P
Thanks for the sample.
but in my case there are lot of logics around selected slot. So I can't change the selected slot for each week navigation.
Regards,
Sugumar P