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. how to change a row color in a data grid view in c# win application project?

how to change a row color in a data grid view in c# win application project?

Scheduled Pinned Locked Moved C#
csharpquestioncssdatabasehelp
3 Posts 3 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.
  • Y Offline
    Y Offline
    yasi2222
    wrote on last edited by
    #1

    :confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me

    D S 2 Replies Last reply
    0
    • Y yasi2222

      :confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me

      D Offline
      D Offline
      Diana Fernandez
      wrote on last edited by
      #2

      Try the following code dgView.Rows[1].DefaultCellStyle.BackColor = Color.Yellow; dgView.Rows[1].DefaultCellStyle.ForeColor = Color.Black; Regards,

      1 Reply Last reply
      0
      • Y yasi2222

        :confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me

        S Offline
        S Offline
        ss mmm
        wrote on last edited by
        #3

        Please refer : http://www.dotnetspider.com/qa/Question102563.aspx[^] Thanks

        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