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. Visual Basic
  4. Coloring rows in DatagridView

Coloring rows in DatagridView

Scheduled Pinned Locked Moved Visual Basic
database
2 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.
  • C Offline
    C Offline
    charchabil03
    wrote on last edited by
    #1

    Hello guys I am reading values from a table from a DB what i want is to color the BackColor of the row for specific values exemple : if row1 at column("columname") ="xxx" --- color row1 in blue if row1 at column("columnname") ="yyy" --- color row1 in yellow and dont change the color of the other row

    Regards Ramy

    S 1 Reply Last reply
    0
    • C charchabil03

      Hello guys I am reading values from a table from a DB what i want is to color the BackColor of the row for specific values exemple : if row1 at column("columname") ="xxx" --- color row1 in blue if row1 at column("columnname") ="yyy" --- color row1 in yellow and dont change the color of the other row

      Regards Ramy

      S Offline
      S Offline
      Star Vega
      wrote on last edited by
      #2

      Hello, Try the DataGridView_CellFormatting method. You can specify some rowdetails like ForeColor, BackColor, etc. depending on the value of the cell. Good luck! Jan

      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