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

Scrolling just the time slot and not the headers

10 Answers 194 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Vikas
Top achievements
Rank 1
Vikas asked on 14 Apr 2015, 07:11 PM

Is it possible to just scroll the time slots (vertical scrolling) and keep the Group headers stay.

 Thanks

vikas

 

10 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 15 Apr 2015, 07:33 AM
Hello Vikas,

By design the GroupHeaders are always kept visible. Can you please share which ViewDefinition are you using and some more details regarding the exact requirements? If you have also share a screenshot or video of the observed behavior that would be really helpful.

Looking forward to hearing from you.

Regards,
Kalin
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Vikas
Top achievements
Rank 1
answered on 15 Apr 2015, 02:19 PM

Hi Kalin,

I was able to get the scroll bar working for ScheduleView, but i am running into another issue, My screen is displaying multiple RadSchedule, please take a look at the ticket for some information (http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=913448)

So i have a Itemscontrol and it displays RadSchedules. I want to have just one scrollbar for all the schedules and i am able to make it work by hiding the vertical scroll for all the schedules except for the last one.

When user scroll the last schedule time slots scrolls but the the other schedules do not, and that is expected, I am not able to figure out how to programatically scroll the other schedules.

RadSchedule does not have a ScrollChanged event.

Thanks

vikas

 

0
Kalin
Telerik team
answered on 16 Apr 2015, 10:50 AM
Hi Vikas,

I understand your concern. What I can suggest you would be to hook to the Loaded event of RadScheduleView in order to get the needed ScrollBar from its Template. Then you can hook to the Scroll event of the ScrollBar and set the VerticalOffset of all ScheduleViews each time the event is raised. For example you can bind the VerticalOffset of all ScheduleViews to a property in the ViewModel and change it when needed. For example please check the following code snippet:

private ScrollBar lastScroll;
 
private void RadScheduleView_Loaded(object sender, RoutedEventArgs e)
{
    var scroll = (sender as RadScheduleView).Template.FindName("PART_VerticalScrollBar", sender as RadScheduleView) as ScrollBar;
 
    if (this.lastScroll != null)
    {
        this.lastScroll.Visibility = System.Windows.Visibility.Collapsed;
        this.lastScroll.Scroll -= scroll_Scroll;
    }
 
    this.lastScroll = scroll;
    this.lastScroll.Scroll += scroll_Scroll;
}
 
void scroll_Scroll(object sender, ScrollEventArgs e)
{
    (this.DataContext as SchedulingTabVM).VerOffset = e.NewValue;
}

Hope this helps.

Regards,
Kalin
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Vikas
Top achievements
Rank 1
answered on 04 Jun 2015, 02:58 PM

Hi Kalin,

I finally got some time to work on this, I am using the approach you mentioned, I have a property in my view model data bind to RadScheduleView Verticaloffset:

<scheduleView:RadScheduleView Grid.Row="1" ActiveViewDefinition="{Binding ActiveViewDefinition, Mode=OneWayToSource}" Width="200" VerticalOffset="{Binding RadScheduleViewVerOffset, Mode=OneWay}" 

the getter for the property is called the first time i add the calendar, but after that when i scroll the offset does not change, I added some traces and the setter is getting called:

public double RadScheduleViewVerOffset
        {
            get
            {
                Console.WriteLine("getting offset for: " + _scheduleName); -- This gets called only for the first time
                return _radScheduleViewVerOffset;                
            }
            set
            {
                Console.WriteLine("Updating offset for: " + _scheduleName + " value: " + value); 
                _radScheduleViewVerOffset = value;
                this.OnPropertyChanged("RadScheduleViewVerOffset");
            }
        }

 

 

 

 

 

 

 

0
Vikas
Top achievements
Rank 1
answered on 04 Jun 2015, 03:16 PM

I am bale to make it work by setting the offset directly on radscheduleView, but it will be good if i can accomplish this using data binding    firstScheduleView.VerticalOffset = e.NewValue;

---------------------------------------------------------------------------------------------------------------------------------------------

I have running into one other problem, it is related to horizontal scrolling. As you know i am displaying multiple schedule views and i want just one scroll bar for them, All the schedules are inside a scroll viewer, I am using that scroll viewer only for horizontal scrolling (for vertical scrolling i am using the one that is part of the schedule view).

So this scroll viewer contains all the schedules + the time marker (which is attached to the first schedule), I am hiding time marker for the other schedule view, Now when i have multiple schedules and the horizontal scroll is visible I scroll and the schedules scorll along with that the time marker also scrolls and is out of view.

when users are trying to book an appointment for a schedule that is on the far right they will scroll to get to it but will not be able to see the time marker and hence wont know what time they are selecting for the appointment.

Is there any way to pin the time marker or is it possible to add just the time marker control with the schedule and scroll it vertically as the other schedules scroll

thanks

vikas

 

0
Kalin
Telerik team
answered on 09 Jun 2015, 11:07 AM
Hello Vikas,

I'm afraid there isn't a straight forward solution for this behavior. What I can suggest you would be to place another ScheduleView outside of the ScrollViewer with time marker only visible (you would need to set Width=55 for example to be only the time ruler part visible). This way it will stay like frozen on the left while the user scrolling horizontally the ScheduleViews in the ScrollViewer.

Hope this will help you.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Vikas
Top achievements
Rank 1
answered on 09 Jun 2015, 02:33 PM

thanks, it worked.

 vikas

0
Vikas
Top achievements
Rank 1
answered on 09 Jun 2015, 02:42 PM

Hi Kalin,

One more question, As we discussed before i am hiding the scrollbar for all the schedules except for the last one and then setting the vertical offset of all the other schedules.

The problem that i am running into is that when there are several schedules and they out of the view I mean horizontally then i have to scroll to the right most schedule to use the vertical scrollbar but then i can not see the first or second schedule.

Basically i want a scrollviewer that contains all the schedules and i can scroll hotrizontally and vertically, I can achieve this by not using schedule scrollviewer at all and putting all the schedules in a separate scrollviewer but with that the problem is that the group headers go out of view when scrolling vertically.

 I understand that this is not a standard functionality but wanted to see if you have any ideas.

Thanks

vikas

 

0
Kalin
Telerik team
answered on 11 Jun 2015, 08:50 AM
Hi Vikas,

You can try to use the same approach as the one for the Timeruler. To use another ScheduleView with only its ScrollBar visible on the right side of the ScrollViewer with the other ScheduleViews.

Hope this will help you.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Vikas
Top achievements
Rank 1
answered on 15 Jun 2015, 05:34 PM

that works.

 

vikas

 

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