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

apply colors to grid row

1 Answer 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Naveen T
Top achievements
Rank 1
Naveen T asked on 21 May 2010, 02:19 PM
Hi,

I am having a grid where i diaplay the data from database, i need each color(It can be for row background or row foreground) for each row.
ex: i will set each  unique color for( radio(blue), TV(yellow), MP3(green)) in other page
when i bind data from database to grid view i need to check with above components and apply that color to the to the grid row
ex: In grid view  data can be like this

Component qunatity price country
MP3              4           20     India
TV             4           20     Russia
Radio             4           20     UK
MP3             4           20     US

In the above data i want to display foreground  of MP3 rows as green as sepecifed above

Regards,
Nav

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 21 May 2010, 05:37 PM
Hi nav kum,

 You can use StyleSelectors to apply conditional styling. Here's a link to a blog post that has an example.

All the best,
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
Naveen T
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or