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. datagridview

datagridview

Scheduled Pinned Locked Moved C#
htmltutorialquestion
4 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.
  • F Offline
    F Offline
    farokhian
    wrote on last edited by
    #1

    Hi I want to markup one of the rows of mydatagridview for example i paint one of the rows. what should i do?

    A K 2 Replies Last reply
    0
    • F farokhian

      Hi I want to markup one of the rows of mydatagridview for example i paint one of the rows. what should i do?

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      Try this

      private void DataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
      {
      e.CellStyle.BackColor = differColour;
      }

      Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

      1 Reply Last reply
      0
      • F farokhian

        Hi I want to markup one of the rows of mydatagridview for example i paint one of the rows. what should i do?

        K Offline
        K Offline
        Khumza007
        wrote on last edited by
        #3

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //Condition here e.Row.BackColor = System.Drawing.Color.Red; }

        Definition of insanity:Doing the same think over & over again expecting different results

        A 1 Reply Last reply
        0
        • K Khumza007

          protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //Condition here e.Row.BackColor = System.Drawing.Color.Red; }

          Definition of insanity:Doing the same think over & over again expecting different results

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          I was only formatting odd cells, didn't notice until your post that he wanted rows :)

          Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

          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