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

Resources - Text Orientation

11 Answers 265 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Milivoj Panautovic
Top achievements
Rank 1
Milivoj Panautovic asked on 13 Apr 2010, 01:02 PM
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!

11 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 16 Apr 2010, 04:16 PM
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.
0
AMF
Top achievements
Rank 2
answered on 25 Mar 2013, 12:33 PM
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
0
AMF
Top achievements
Rank 2
answered on 25 Mar 2013, 12:33 PM
..
0
Anton
Telerik team
answered on 28 Mar 2013, 09:56 AM
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.
0
Victor
Top achievements
Rank 2
answered on 08 Nov 2016, 10:52 PM

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.

 

0
Victor
Top achievements
Rank 2
answered on 08 Nov 2016, 10:59 PM
Now with the attachments
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Nov 2016, 12:46 PM
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.
0
Victor
Top achievements
Rank 2
answered on 11 Nov 2016, 11:40 PM

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

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 15 Nov 2016, 02:59 PM
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.
0
Victor
Top achievements
Rank 2
answered on 15 Nov 2016, 03:08 PM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Nov 2016, 07:26 AM
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.
Tags
Scheduler and Reminder
Asked by
Milivoj Panautovic
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
AMF
Top achievements
Rank 2
Anton
Telerik team
Victor
Top achievements
Rank 2
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or