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

[Solved] Formatting cell text

1 Answer 93 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.
Bill Jindrich
Top achievements
Rank 1
Bill Jindrich asked on 22 Jan 2010, 12:25 AM
I have the need to format the text in certain cells in my gridView to be colored Red, based on certain rules. I already have a converter function for this column, so I assumed that I could use that, to return a TextBlock, but that doesn't work. Here's a snip of my XAML:
...

 

 

<Controls:RadGridView.Columns>

 

 

 

 ...

 

 

    <Controls:GridViewDataColumn DataMemberBinding="{Binding dueDate, Converter={StaticResource dateConverter}}" Header="Due Date" DataFormatString=" {0:dd/MM/yyyy}" TextWrapping="Wrap" IsReadOnly="True" UniqueName="dueDate"/>

In my dateConverter.Convert() function I tried returning a formatted TextBlock instead of a String - didn't work. What's the easiest way to accomplish this?  Thanks in advance!

 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Jan 2010, 07:03 AM
Hi,

You can check this post for more info about how to apply conditional formatting:
http://blogs.telerik.com/pavelpavlov/posts/09-10-03/adding_additional_power_to_radgridview_for_silverlight_with_attached_behaviors.aspx


Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Bill Jindrich
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or