Configure or Enable Horizontal scroll bar for the date range

6 posts, 0 answers
  1. James
    James avatar
    41 posts
    Member since:
    Jul 2007

    Posted 31 May 2012 Link to this post

    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
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 31 May 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. James
    James avatar
    41 posts
    Member since:
    Jul 2007

    Posted 31 May 2012 Link to this post

    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.
  5. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 31 May 2012 Link to this post

    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
  6. James
    James avatar
    41 posts
    Member since:
    Jul 2007

    Posted 31 May 2012 Link to this post

    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.

  7. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 01 Jun 2012 Link to this post

    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
Back to Top
DevCraft banner