Resources - Text Orientation

12 posts, 0 answers
  1. Milivoj Panautovic
    Milivoj Panautovic avatar
    1 posts
    Member since:
    Apr 2010

    Posted 13 Apr 2010 Link to this post

    Hi everyone,

    I'm using TimeLine View, in combination with Resources, and for few days now, I've been trying to customize my scheduler appearance, namely - Text orientation and width properties of the left-most column (Resource Names). Default value for Text orientation is vertical (90° CCW from horizontal). Now, I'd like to set it to horizontal, with "witdh" property sufficient enough for complete text to be visible, but it seems that I am missing something here. Is this possible, and, if yes, how could I do it?

    Many Thanks!
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 16 Apr 2010 Link to this post

    Hi Milivoj Panautovic,

    You can use the following  code snippet before you set the Timeline grouping:
    this.radScheduler.SchedulerElement.SetResourceHeaderAngleTransform(SchedulerViewType.Timeline, 0);

    This will ensure that the Resource header cells are rotated to 0 degrees.

    I hope this helps.

    Regards,
    Boyko Markov
    the Telerik team

     


    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. AMF
    AMF avatar
    34 posts
    Member since:
    Mar 2011

    Posted 25 Mar 2013 Link to this post

    Hi Boyko,

    I'v tried this approach, and the rotating works fine. But how do I get the width of the Resource header to fit the full name. Now I can only see the first 3 characters. 

    greetings
  5. AMF
    AMF avatar
    34 posts
    Member since:
    Mar 2011

    Posted 25 Mar 2013 Link to this post

    ..
  6. Anton
    Admin
    Anton avatar
    167 posts

    Posted 28 Mar 2013 Link to this post

    Hi,

    Thank you for writing.

    Following example demonstrates how you can change the width of the Resources cell when ActiveViewType is Timeline:
    private void Form1_Load(object sender, EventArgs e)
    {
        Resource resource = new Resource();
        resource.Id = new EventId(0);
        resource.Name = "Robert Shoemate";
        resource.Color = Color.Blue;
        resource.Visible = true;
        radScheduler1.Resources.Add(resource);
     
        this.radScheduler1.GroupType = GroupType.Resource;
     
        this.radScheduler1.SchedulerElement.SetResourceHeaderAngleTransform(SchedulerViewType.Timeline, 0);
        this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;
          
        TimelineGroupingByResourcesElement element = this.radScheduler1.SchedulerElement.ViewElement as TimelineGroupingByResourcesElement;
        element.ResourcesHeader.MinSize = new System.Drawing.Size(150, 50);
        SchedulerTimelineViewElement timelineViewElement = element.FindDescendant<SchedulerTimelineViewElement>();
        timelineViewElement.Margin = new Padding(120, 0, 0, 0);
    }

    Attached is a project that comprises the code above.

    If this is not the case, please describe in greater detail what is your goal, so I can provide you with adequate support.

    I hope this helps. Let me know if you have any additional questions.

    Greetings,
    Anton
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
  7. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 08 Nov in reply to Anton Link to this post

    Hello Support,

    I have the same question and I have tried your solution. I have attached 2 screenshots. The first one has only the rotation of the header-text. Works fine except the width of the column.

    The second file has the last 4 lines as well

    Nothing changes, except that the text of the resources is completely gone. So what do I do wrong.

     

  8. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 08 Nov in reply to Victor Link to this post

    Now with the attachments
  9. Dess
    Admin
    Dess avatar
    1605 posts

    Posted 09 Nov Link to this post

    Hello Victor,

    Thank you for writing.  

    Please refer to our Demo application >> Scheduler >> Grouping example which demonstrates how to increase the resource header's width in Timeline View. It is located in the installation folder of the suite, usually found in the following path: C:\Program Files (x86)\Telerik\UI for WinForms R3 2016\Examples\QuickStart\Bin

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  10. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 11 Nov in reply to Dess Link to this post

    Hello Dess,

    I have come a long way with your tip. In order to have mulltiple lines on the screen I use the

     radScheduler1.GetTimelineView().ResourcesPerView = 14;

    Yet if you change the height of the window/scheduler the rows become too small or too big.

    Is there a way to set the resource-row height to a fixed height?

    Thanks

    Victor

     

  11. Dess
    Admin
    Dess avatar
    1605 posts

    Posted 15 Nov Link to this post

    Hello Victor, 

    Thank you for writing back. 

    When using Timeline View, RadScheduler displays its resources on the left side. The width of the resources' headers can be controlled by the TimelineGroupingByResourcesElement .ResourceHeaderWidth property. As to the height, note that the resource headers in Timeline View are vertically stretched to fill the entire space of the control. Hence, considering the available height of the data area and the ResourcesPerView property value, the height is distributed equally to all resources. If you have a very small height for RadScheduler, it is recommended to reduce the displayed resources per view in order to avoid smashed resource headers. In addition, it is possible to specify the portion a certain resource takes by the SetResourceSize method.

    I hope this information helps. If you have any additional questions, please let me know. 

    Regards,
    Dess
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  12. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 15 Nov in reply to Dess Link to this post

    Hi Dess,

    What I'm trying to achieve is that my timelineview looks the same as a gridview. That means that I need a fixed height of a scheduler row, independent of the height of the scheduler. From your answer, I thing the only thing that rests for me is to calculate the Resources per view depending on the height of the scheduler-control/window.

     

    But again thanks again for your elaborate answer.

     

    Regards,

    Victor

  13. Dess
    Admin
    Dess avatar
    1605 posts

    Posted 17 Nov Link to this post

    Hello Victor,

    Thank you for writing.  

    An alternative solution is to use RadGridView indeed. Thus, you can control the row height. RadGridView also provides a convenient way for custom painting which can simulate appointments. Additional information is available in the following help articles:

    http://docs.telerik.com/devtools/winforms/gridview/rows/painting-rows
    http://docs.telerik.com/devtools/winforms/gridview/cells/painting-and-drawing-in-cells

    Our Demo application >> GridView >> Customize >> Custom Painting example is quite useful on this topic.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Back to Top
UI for WinForms is Visual Studio 2017 Ready