Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Changing row backcolor based on a column value from dataset

Reply
Thread Tools

Changing row backcolor based on a column value from dataset

 
 
Chris Bond
Guest
Posts: n/a
 
      09-17-2003
I have a asp vb.net webform that uses a dataset to bind from a mssql backend
via a stored proc and displays its results in a datagrid.

In one of the datagrid columns i have a field called status - if this field
is "READ" i want the backcolor blue, if it is "IMPORTANT" i want the
backcolor red otherwise i want the backcolor "lightblue" by backcolor i mean
the whole row.

Any ideas how to do this?

Kind Regards,
Chris Bond


 
Reply With Quote
 
 
 
 
Chris Bond
Guest
Posts: n/a
 
      09-17-2003
Fixed it added a hidden column to the datagrid for status and followed
http://www.dotnetjunkies.com/Tutoria...1&forumId=4261 -
works a dream!

"Chris Bond" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a asp vb.net webform that uses a dataset to bind from a mssql

backend
> via a stored proc and displays its results in a datagrid.
>
> In one of the datagrid columns i have a field called status - if this

field
> is "READ" i want the backcolor blue, if it is "IMPORTANT" i want the
> backcolor red otherwise i want the backcolor "lightblue" by backcolor i

mean
> the whole row.
>
> Any ideas how to do this?
>
> Kind Regards,
> Chris Bond
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How select row in gridview based on value of a column? Bobby Edward ASP .Net 0 10-09-2008 03:41 AM
populate a dg column based upon the value populated to another row in the datagrid Mike P ASP .Net 1 01-13-2006 11:43 AM
change backcolor of a particular row Harsh Vardhan Singh ASP .Net Datagrid Control 1 03-02-2005 03:00 PM
Help with setting row backcolor =?Utf-8?B?Q2hyaXM=?= ASP .Net 1 03-01-2005 02:31 PM
Changing row backcolor based on a column value from dataset Chris Bond ASP .Net Datagrid Control 1 09-17-2003 11:30 AM



Advertisments