Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Datagrid row Color

Datagrid row Color

Scheduled Pinned Locked Moved C#
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reinier van de Wetering
    wrote on last edited by
    #1

    Is there a way to change a row's color in a datagrid? I've got a datagrid where i would like to change every 3rd row's color. Is this possible???:doh:

    M 1 Reply Last reply
    0
    • R Reinier van de Wetering

      Is there a way to change a row's color in a datagrid? I've got a datagrid where i would like to change every 3rd row's color. Is this possible???:doh:

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      I have a article about How to change a back color of one cell based on its value. http://www.codeproject.com/csharp/custom_datagridcolumnstyl.asp[^] There are sone other articles in this site which I think about changing the color of entire row, use the serach engine at top of this page. Mazy "Art is life, life is life, but to lead life artistically is the art of life." - Peter Altenberg

      R 1 Reply Last reply
      0
      • M Mazdak

        I have a article about How to change a back color of one cell based on its value. http://www.codeproject.com/csharp/custom_datagridcolumnstyl.asp[^] There are sone other articles in this site which I think about changing the color of entire row, use the serach engine at top of this page. Mazy "Art is life, life is life, but to lead life artistically is the art of life." - Peter Altenberg

        R Offline
        R Offline
        Reinier van de Wetering
        wrote on last edited by
        #3

        Thnxs for your answer, I got it to change every 3rd row. But now there is a different problem, the instant i scroll down on the datagrid the colors get messed up or changes to one color. Do you know what this problem could be?

        R 1 Reply Last reply
        0
        • R Reinier van de Wetering

          Thnxs for your answer, I got it to change every 3rd row. But now there is a different problem, the instant i scroll down on the datagrid the colors get messed up or changes to one color. Do you know what this problem could be?

          R Offline
          R Offline
          Reinier van de Wetering
          wrote on last edited by
          #4

          Don't worry, i got the problem, it was pretty stupid. Thnxs for the help.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups