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

Change format for column in gridview

1 Answer 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Triet Nguyen Cong
Top achievements
Rank 2
Triet Nguyen Cong asked on 29 Jun 2010, 11:46 AM
Hi Telerik team,

I have a gridview with dynamic columns. If a cell has different value with previous cell, I have to paint it with other color (sample: red). Do you have any idea for this?

  <telerik:RadGridView x:Name="grvDTSummary"  Grid.Row="1" MinHeight="340" ColumnWidth="80" MaxColumnWidth="300" 
                                                     Style="{StaticResource GridViewNormal}" 
                                                     AutoGenerateColumns="True" IsBusy="{Binding IsBusy, Mode=TwoWay}" 
                                                     ItemsSource="{Binding Path=ListDTSummary, Mode=TwoWay}"/> 

Thanks,
Triet

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 29 Jun 2010, 11:56 AM
Hi Triet Nguyen Cong,

 You can do that by setting the CellStyleSelector property on the column whose cells you wish to apply conditional styling to. In your case, you'll need to handle the AutoGeneratingColumn event of the GridView.

You can learn more about the StyleSelector and DataTemplateSelector types in this blog post and from our documentation.

Sincerely yours,
Yavor Georgiev
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
Tags
GridView
Asked by
Triet Nguyen Cong
Top achievements
Rank 2
Answers by
Yavor Georgiev
Telerik team
Share this question
or