Rad Scheduler - how to set color with specific height in timeline control

7 posts, 0 answers
  1. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 19 May 2017 Link to this post

    Rad Scheduler - how to set color with specific height in timeline control with month wise

    Ex :-Month 1: set color with 500 height

    Ex:- Month 2 : set color with  800 height

  2. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 19 May 2017 Link to this post

    how to display  cell color with specific height in scheduler control or display arrow or border color on some specific height in timeline control (arrow attach image)
  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3321 posts

    Posted 19 May 2017 Link to this post

    Hello John, 

    Thank you for writing.  

    The RadScheduler.CellFormatting event is appropriate for customizing scheduler's cell and changing the color by setting the BackColor property for the CellElement. Additional information is available here: http://docs.telerik.com/devtools/winforms/scheduler/appearance/formatting-cells

    However, I am not sure what exactly do you mean by "color with specific height". Could you please give us some more details what is the exact goal that you are trying to achieve? Thus, we would be able to think about a suitable solution. 

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

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 21 May 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    I am saying dispaly cell of two color in timeline view

    ex: 1 cell :- red color with 500 height and white color with 300 height

          2 cell :- red color with 400 height and white color with 300 height

    how to possible in timeline view not any other view

  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3321 posts

    Posted 22 May 2017 Link to this post

    Hello John, 

    Thank you for writing back. 

    In order to obtain different colors in a SchedulerCellElement, it is possible to use a Linear GradientStyle. Here is demonstrated a sample code snippet which result is illustrated in the attached screenshot:
    public RadForm1()
    {
        InitializeComponent();
     
        this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline;
    }
     
    private void radScheduler1_CellFormatting(object sender, Telerik.WinControls.UI.SchedulerCellEventArgs e)
    {
        e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Linear;
        e.CellElement.GradientPercentage = 0.5f;
        e.CellElement.GradientPercentage2 = 0.66f;
        e.CellElement.NumberOfColors = 4;
        e.CellElement.BackColor = Color.Red;
        e.CellElement.BackColor2 = Color.FromArgb(255,153,153);
        e.CellElement.BackColor3 = Color.FromArgb(255,229,204);
        e.CellElement.BackColor4 = Color.White;
    }

    Note that this is just a sample approach. Feel free to adjust the style settings in a way to obtain the required look.

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

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 22 May 2017 Link to this post

    Thanks for Reply.

    But I want to need set every cell different color with different height

  7. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3321 posts

    Posted 23 May 2017 Link to this post

    Hello John, 

    Thank you for writing back. 

    The CellFormatting event is fired for each cell in the current view of RadScheduler. Considering the CellElement.Date property you can create a condition which cells to be colored and which not. The following help article demonstrates how to format the cells: http://docs.telerik.com/devtools/winforms/scheduler/appearance/formatting-cells

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

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top