Hi,
I have a grid view and want a date column to be conditionally formatted. It works using the code shown below however the header cell for that column also gets formatted. How do I prevent only the data getting formatted. Code follows.
Regards,
Jon
I have a grid view and want a date column to be conditionally formatted. It works using the code shown below however the header cell for that column also gets formatted. How do I prevent only the data getting formatted. Code follows.
Regards,
Jon
Dim amberFormatting As New Telerik.WinControls.UI.ConditionalFormattingObject("Amber", Telerik.WinControls.UI.ConditionTypes.LessOrEqual, Now(), "", False) |
amberFormatting.CellBackColor = Color.FromArgb(255, 209, 140) |
uxRadGridView.Columns("Due").ConditionalFormattingObjectList.Add(amberFormatting) |
Dim greenFormatting As New Telerik.WinControls.UI.ConditionalFormattingObject("Green", Telerik.WinControls.UI.ConditionTypes.Greater, Now(), "", False) |
greenFormatting.CellBackColor = Color.FromArgb(219, 251, 91) |
uxRadGridView.Columns("Due").ConditionalFormattingObjectList.Add(greenFormatting) |
6 Answers, 1 is accepted
0
Hi Jon,
The issue is fixed in Q2 2009 release which is to be released within a week. Thank you for your patience.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The issue is fixed in Q2 2009 release which is to be released within a week. Thank you for your patience.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Jon
Top achievements
Rank 1
answered on 02 Jul 2009, 11:12 AM
Hi Nick,
Sounds great - I did get around it using the CellFormatting event in the end. As it happened the requirement got more complex so I needed more logic in and it made sense to do it a different way.
Re the release next week is that the Beta release of the Q2 for WinForms or is it the full release?
Regards,
Jon
Sounds great - I did get around it using the CellFormatting event in the end. As it happened the requirement got more complex so I needed more logic in and it made sense to do it a different way.
Re the release next week is that the Beta release of the Q2 for WinForms or is it the full release?
Regards,
Jon
0
Hi Jon,
The upcoming release is an official release. We have already released a beta of RadDock, but at this stage it is no longer important.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The upcoming release is an official release. We have already released a beta of RadDock, but at this stage it is no longer important.
Best wishes,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Jon
Top achievements
Rank 1
answered on 02 Jul 2009, 02:32 PM
That's great news - thanks Nick.
Regards,
Jon
Regards,
Jon
0

Jon
Top achievements
Rank 1
answered on 28 Sep 2009, 05:20 PM
I'm using the current build and I still can't get the conditional to fire properly on dates:
It colors all the rows red not just the ones overdue.
Telerik.WinControls.UI.ConditionalFormattingObject conditionalFormattingObject1 = new Telerik.WinControls.UI.ConditionalFormattingObject(); |
conditionalFormattingObject1.ApplyToRow = true; |
conditionalFormattingObject1.ConditionType = Telerik.WinControls.UI.ConditionTypes.LessOrEqual; |
conditionalFormattingObject1.Name = "OverDue"; |
conditionalFormattingObject1.RowBackColor = System.Drawing.Color.Red; |
conditionalFormattingObject1.TValue1 = "DateTime.Now"; |
gridViewDateTimeColumn6.ConditionalFormattingObjectList.Add(conditionalFormattingObject1); |
It colors all the rows red not just the ones overdue.
0
Hi Jon,
Thank you for contacting us. Please change your code to:
It seems to work. Please write me back if you have more questions.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for contacting us. Please change your code to:
... |
conditionalFormattingObject1.TValue1 = DateTime.Now.ToString(); |
... |
It seems to work. Please write me back if you have more questions.
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.