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

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

6 Answers 124 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 19 May 2017, 05:58 AM

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

6 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 19 May 2017, 06:40 AM
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)
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 May 2017, 09:27 AM
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.
0
John
Top achievements
Rank 1
answered on 22 May 2017, 04:12 AM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 May 2017, 09:28 AM
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.
0
John
Top achievements
Rank 1
answered on 22 May 2017, 11:15 AM

Thanks for Reply.

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 May 2017, 09:09 AM
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.
Tags
Scheduler and Reminder
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or