Setting cell backcolor

Discussion in 'ASP .Net Datagrid Control' started by Todd Q, Aug 18, 2004.

  1. Todd Q

    Todd Q Guest

    Does anyone know how to set the backcolor of an individual cell in a
    datagrid? I've tried using DataGridTableStyle and DataGridTextBoxColumn
    objects but I still cannot set the backcolor of a cell.

    Please help.

    Thanks,

    Todd Quattlebaum

     
    Todd Q, Aug 18, 2004
    #1
    1. Advertising

  2. Todd Q

    Laiju Skaria Guest

    Hello Todd...
    IM not sure whether this is the correct method. But u can set the Text
    property of that appropriate cell to an HTML string with the necessary
    format u need.....

    hope this will help..

    smiles,
    Laiju
    "Todd Q" <> wrote in message
    news:#...
    > Does anyone know how to set the backcolor of an individual cell in a
    > datagrid? I've tried using DataGridTableStyle and DataGridTextBoxColumn
    > objects but I still cannot set the backcolor of a cell.
    >
    > Please help.
    >
    > Thanks,
    >
    > Todd Quattlebaum
    >
    >
    >
    >
     
    Laiju Skaria, Aug 19, 2004
    #2
    1. Advertising

  3. Once you have the reference to the instance of TableCell, set its CssClass
    property to a style with the setting you need.

    Eliyahu

    "Todd Q" <> wrote in message
    news:%...
    > Does anyone know how to set the backcolor of an individual cell in a
    > datagrid? I've tried using DataGridTableStyle and DataGridTextBoxColumn
    > objects but I still cannot set the backcolor of a cell.
    >
    > Please help.
    >
    > Thanks,
    >
    > Todd Quattlebaum
    >
    >
    >
    >
     
    Eliyahu Goldin, Aug 19, 2004
    #3
  4. Todd Q

    Todd Q Guest

    Eliyahu,

    Thank you very much for your reply. I'm sorry I failed to mention I'm
    writing a Windows Mobile application. Do you have any suggestions for
    setting datagrid cell backcolor in a Windows/Windows Mobile environment?

    Thanks,

    Todd

    "Eliyahu Goldin" <> wrote in message
    news:e$...
    > Once you have the reference to the instance of TableCell, set its CssClass
    > property to a style with the setting you need.
    >
    > Eliyahu
    >
    > "Todd Q" <> wrote in message
    > news:%...
    > > Does anyone know how to set the backcolor of an individual cell in a
    > > datagrid? I've tried using DataGridTableStyle and DataGridTextBoxColumn
    > > objects but I still cannot set the backcolor of a cell.
    > >
    > > Please help.
    > >
    > > Thanks,
    > >
    > > Todd Quattlebaum
    > >
    > >
    > >
    > >

    >
    >
     
    Todd Q, Aug 19, 2004
    #4
    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. WilsonSmith

    Setting the backcolor

    WilsonSmith, Jul 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,315
    David Wier
    Jul 26, 2004
  2. Franck
    Replies:
    1
    Views:
    721
    Eliyahu Goldin
    Jun 7, 2005
  3. rjl
    Replies:
    5
    Views:
    634
  4. Mike P
    Replies:
    1
    Views:
    3,892
    harlequinben
    Aug 30, 2006
  5. feel

    how to change backcolor on cell at runtime for c# ?

    feel, Jul 27, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    176
    Eliyahu Goldin
    Jul 27, 2005
Loading...

Share This Page