or
Private _masterEvent As Telerik.WinControls.UI.IEvent Public Shadows ReadOnly Property MasterEvent() As Telerik.WinControls.UI.IEvent Get If Object.Equals(_masterEvent, Nothing) Then Return Nothing Else Return _masterEvent End If End Get End Property Public Overrides Function CreateOccurrence(start As Date) As Telerik.WinControls.UI.IEvent Dim appointment As New JobAppointment() Dim startDate As Date = start Dim ts As TimeSpan = Me.Duration Dim endDate As Date = startDate.Add(ts) .......... 'Added this to set the settings required by Telerik. appointment.ApplySettingsToAppointment() 'For repeated occurrences.. Dim appType As Type = GetType(Telerik.WinControls.UI.Appointment) appType.GetField("masterEvent", System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(appointment, Me) Return appointment End FunctionIf RecurrenceRule IsNot Nothing Then If RecurrenceRule.IsValid Then JobRecurrenceRule = CalHelper.RecurrenceRuleToString(RecurrenceRule) End IfEnd IfIf JobRecurrenceRule <> "" Then CalHelper.TryParseRecurrenceRule(JobRecurrenceRule, RecurrenceRule)End IfCalHelper.TryParseRecurrenceRule(JobRecurrenceRule, RecurrenceRule)I am trying to set the backcolor of a gridview GridViewCommandColumn using conditional formating, but it is not showing the colors:
I am using gridview version 2011.1.11.419
Please help
Thanks
Here is the code:
void radGV_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (mycondn == true) { e.CellElement.DrawFill = true; e.CellElement.ForeColor = Color.Blue; e.CellElement.NumberOfColors = 1; e.CellElement.BackColor = System.Drawing.Color.Gold; } else { e.CellElement.DrawFill = true; e.CellElement.ForeColor = Color.Blue; e.CellElement.NumberOfColors = 1; e.CellElement.BackColor = System.Drawing.Color.LightBlue; }
}my cell is created like this:
//data base field name is ScDate GridViewCommandColumn colSchDelDate = new GridViewCommandColumn("ScDate"); colSchDelDate.UseDefaultText = false; colSchDelDate.Width = 80; colSchDelDate.HeaderText = "Sc Date"; colSchDelDate.ReadOnly = true; colSchDelDate.FormatString = "{0:MM/dd/yy}"; colSchDelDate.TextAlignment = ContentAlignment.MiddleCenter; radGV.MasterTemplate.Columns.Add(colSchDelDate);}
(gridViewTemplateTaxData.Columns["FilingStatus"] as GridViewComboBoxColumn).DataSource = Enum.GetNames(typeof(TaxFilingStatus));