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

[Solved] RadGridView Color

2 Answers 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.
Martin
Top achievements
Rank 1
Martin asked on 21 Sep 2010, 03:32 PM
Hello,

I have a GridView in my Silverlight Application. The first row is "Color". At the moment, there is shown the hexadecimal code of the Color. However, I want that the Cell has this Color (for each row a different color).

How is that possible? Is it even possible?


Thanks,

Maritn

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 22 Sep 2010, 09:47 AM
Hello Martin,

Lets suppose that you generate your DataSource in Blend then you can define a CellTemplate for your Column and implement your own logic there,something like this:
<telerik:GridViewDataColumn Header="Color" DataMemberBinding="{Binding Property4}">
      <telerik:GridViewDataColumn.CellTemplate>
           <DataTemplate>
               <Border Width="100" Height="100" Background="{Binding Property4}"/>
         </DataTemplate
 </telerik:GridViewDataColumn.CellTemplate>
 </telerik:GridViewDataColumn>

where Property4 is the property that contains hexadecimal representation of the generated colour.
If you need any additional information let me know.

Greetings,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Martin
Top achievements
Rank 1
answered on 22 Sep 2010, 10:35 AM
Thanks,

it works like a charm.
Tags
GridView
Asked by
Martin
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Martin
Top achievements
Rank 1
Share this question
or