dynamic stylesheet

G

Guest

I have a datalist being displayed as a table with 3 columns, the end user
would like to see the tables have different background colors based on model.

ex:
if model is chevy then the table is blue
if BMW then silver
if mazda then red

how can i accomplish this and can it be done?
VB.NET
 
E

Eliyahu Goldin

Do you mean setting different background colors for individual rows? Then
you should use ItemDataBound event in which you can change the background
color or CssStyle for the item (row) depending on item data.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,160
Latest member
CollinStri
Top