Increase Resource Header width

7 posts, 0 answers
  1. Mohan
    Mohan avatar
    22 posts
    Member since:
    Apr 2009

    Posted 10 Aug 2010 Link to this post

    Hi,

    Is there a way to increase the resource header width and the font color.

    Please see the attached image.

    thanks
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 16 Aug 2010 Link to this post

    Hello Mohan,

    Thank you for contacting us.

    Please consider the following code snippet which changes the resources appearance:

    TimelineGroupingByResourcesElement element = this.radScheduler1.SchedulerElement.ViewElement as TimelineGroupingByResourcesElement;
    element.ResourceHeaderWidth = 200;
    element.Font = new Font("Arial", 22);
    element.ForeColor = Color.Yellow;

    I hope you find this information helpful. Should you need any additional assistance, do not hesitate to contact us.

    Kind regards,
    Stefan
    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. Mohan
    Mohan avatar
    22 posts
    Member since:
    Apr 2009

    Posted 16 Aug 2010 Link to this post

    Hi, 

    thanks for the reply.

    I tried what you suggested but it is not working.

    TimelineGroupingByResourcesElement element = this.radScheduler1.SchedulerElement.ViewElement as TimelineGroupingByResourcesElement;

    element is null. 

    this.radScheduler1.ScheduleElement.ViewElement is of the type Telerik.WinControls.UI.SchedulerTimelineViewElement
  5. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 19 Aug 2010 Link to this post

    Hello Mohan,

    Thanks for writing back.

    The code snippet of my colleague in the previous post will work only for the SchedulerTimelineViewElement. This implies that before accessing it, you should set the following properties of your scheduler:

    this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;
    this.radScheduler1.GroupType = GroupType.Resource;

    I hope this helps. Let me know if I can assist you further.

    All the best,
    Dobry Zranchev
    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
  6. Kristian
    Kristian avatar
    1 posts
    Member since:
    Sep 2010

    Posted 05 Sep 2010 Link to this post

    How is this done in VB?

    Regards,

    Kristian
  7. Brennan
    Brennan avatar
    5 posts
    Member since:
    Jul 2010

    Posted 07 Sep 2010 Link to this post

    Hey Kristian,

    http://www.developerfusion.com/tools/convert/csharp-to-vb/   is a great c# to vb converter; I use it daily.

    Cheers,

    Brennan
  8. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 08 Sep 2010 Link to this post

    Hello Kristian,

    You can use Telerik's free code converter to convert C# to VB and vice versa: http://codechanger.com/

    Here is the code snippet in VB:
     
    Dim element As TimelineGroupingByResourcesElement = TryCast(Me.radScheduler1.SchedulerElement.ViewElement, TimelineGroupingByResourcesElement)
    element.ResourceHeaderWidth = 200
    element.Font = New Font("Arial", 22)
    element.ForeColor = Color.Yellow

    Me.radScheduler1.ActiveViewType = SchedulerViewType.Timeline
    Me.radScheduler1.GroupType = GroupType.Resource


    All the best,
    Dobry Zranchev
    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready