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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Color in Datagrid view

Color in Datagrid view

Scheduled Pinned Locked Moved C#
4 Posts 4 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.
  • M Offline
    M Offline
    Mr Khan Firoz
    wrote on last edited by
    #1

    Hi friends, plz any one reply me how can we change datagridview row's background color in runtime.

    C B B 3 Replies Last reply
    0
    • M Mr Khan Firoz

      Hi friends, plz any one reply me how can we change datagridview row's background color in runtime.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If this is not an ASP.NET question, surely the control has a Background or BackgroundColor property ? If not, you'd have to owner draw it, but that would seem odd to me.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • M Mr Khan Firoz

        Hi friends, plz any one reply me how can we change datagridview row's background color in runtime.

        B Offline
        B Offline
        BicycleTheif
        wrote on last edited by
        #3

        DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.Blue; this.dataGridView1.RowsDefaultCellStyle = style;

        1 Reply Last reply
        0
        • M Mr Khan Firoz

          Hi friends, plz any one reply me how can we change datagridview row's background color in runtime.

          B Offline
          B Offline
          Brij
          wrote on last edited by
          #4

          Do it as gridviewID.BackColor = "ffffff";

          Cheers!! Brij

          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