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

Configure or Enable Horizontal scroll bar for the date range

5 Answers 180 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 31 May 2012, 12:15 PM
I am trying to enable the horizontal scrolling for the date range section ..

I've used this as an example to get the styles working - it does not have the horizontal scroll bar working
http://www.telerik.com/community/forums/silverlight/ganttview/unable-to-set-ganttview-theme.aspx
I change the date range on line 32 of the ViewModel.cs in the example at the bottom of that ticket. so that scroll bars should be needed.
            VisibleRange = new VisibleRange(date.AddDays(5), date.AddDays(9));


This is an example from the online demos that has a horizontal scroll bar which works..
http://demos.telerik.com/silverlight/Default.aspx#GanttView/FirstLook


I cant seem to find the correct element to turn on this scroll bar.

Thanks in advance

5 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 31 May 2012, 04:19 PM
Hi James,

I'm sorry, but I cannot understand what issue are you facing and what do you need to achieve. Could you please explain what behavior do you need and what exactly goes wrong?

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
James
Top achievements
Rank 1
answered on 31 May 2012, 04:23 PM
See the screen shot attached to first post.

There is a horizontal scroll bar for the graphical (right hand side) of the gantt chart.

I want to be able to enable this , I want to turn it on so that I dont have to set the visiblerange using code..

It is possibly an attribute or setting that can be set with styles, but I cant figure out what it is.
0
Lancelot
Top achievements
Rank 1
answered on 31 May 2012, 05:32 PM
Hi James,

If you go to your telerik example solution (located in your C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2012 SP1\Demos ) and open the Solution ExamplesCS_SL.sln in Visual Studio, you can open the example directly by locating Examples > GanntView.Silverlight > FirstLook.xaml in your solution explorer.

Open the example app and notice it uses GanntStyle.xaml and ScrollBarStyle.xaml for DictionaryResources. The scrollBar uses this style resource. These dictionaries are in the same project under GanntView.Silverlight > Common > Metro.

You can also locate the other styles under common, but the one you are referring to is under the Metro folder.

I hope this helps you create the scrollbar you are looking for, if not, provide me with your xaml and I can help you more directly.

Good Luck!
Lancelot
0
James
Top achievements
Rank 1
answered on 01 Jun 2012, 03:14 AM
Problem solved.

It had nothing to do with Styles.

The scroll bar was not visible because the visible range was too small.

I had thought VisibleRange meant set the range of tasks like a viewport, but it doesn't - it appears to set the range of all data available.

So setting smaller and smaller visibleranges, I was expected that this would make scrollbars needed to get to the non visible data, but in actual fact, setting it smaller and smaller meant all available data (a small section) was visible on the one screen and therefore no scrolling required.

I set the visible range to  today.addyears(-1), today.addyears(+1)... and bingo - scrolling is required.

0
Lancelot
Top achievements
Rank 1
answered on 01 Jun 2012, 12:19 PM
Hi James,

I'm glad you found a solution and thank you for sharing it. This post is searchable and will help anyone in the future who faces the same issue. Let me know if I can be of any additional assistance.

Sincerely,
Lancelot
Tags
GanttView
Asked by
James
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
James
Top achievements
Rank 1
Lancelot
Top achievements
Rank 1
Share this question
or