Changing row backcolor based on a column value from dataset

Discussion in 'ASP .Net' started by Chris Bond, Sep 17, 2003.

  1. Chris Bond

    Chris Bond Guest

    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
     
    Chris Bond, Sep 17, 2003
    #1
    1. Advertising

  2. Chris Bond

    Chris Bond Guest

    Fixed it added a hidden column to the datagrid for status and followed
    http://www.dotnetjunkies.com/Tutori...FE75-4C0A-4DDB-94FA-0F14C64DD281&forumId=4261 -
    works a dream!

    "Chris Bond" <> wrote in message
    news:...
    > 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
    >
    >
     
    Chris Bond, Sep 17, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hyaXM=?=

    Help with setting row backcolor

    =?Utf-8?B?Q2hyaXM=?=, Feb 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,695
    =?Utf-8?B?Q2hyaXM=?=
    Mar 1, 2005
  2. Mike P
    Replies:
    1
    Views:
    385
    DavidG
    Jan 13, 2006
  3. Chris Bond

    Changing row backcolor based on a column value from dataset

    Chris Bond, Sep 17, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    266
    Chris Bond
    Sep 17, 2003
  4. Harsh Vardhan Singh

    change backcolor of a particular row

    Harsh Vardhan Singh, Feb 9, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    164
    Arthur Dent
    Mar 2, 2005
  5. avanti
    Replies:
    1
    Views:
    306
    Scott M.
    Oct 25, 2006
Loading...

Share This Page