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

[Solved] Dynamically assign column font color based on input data

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
siva
Top achievements
Rank 1
siva asked on 20 Apr 2009, 03:06 PM
Hello telerik team,

Is there an easy way to dynamically assign the font color of a column dynamically, based on the input data to it?
Any sample example would be helpful and appreciated.

Regards
Siva


P.s: I went through some of your blogs and noticed that you are suggesting to use the code as below:

   var unitPriceCells = RadGridView1.ChildrenOfType<GridViewCell>().Where(c => c.Column.UniqueName == "UnitPrice").ToList(); 
   unitPriceCells.ForEach(c => c.Background = Brushes.Orange); 


But, iam not finding ChildrenOfType property for Gridview.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 21 Apr 2009, 07:20 AM
Hello siva,

You need to add:

using Telerik.Windows.Controls;

All the best,
Vlad
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.
Tags
GridView
Asked by
siva
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or