Results 1 to 4 of 4

Thread: [2005] - Colouring Rows In DataGridView

Hybrid View

  1. #1
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] - Colouring Rows In DataGridView

    Set the DefaultCellStyle.BackColor property of the row.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    111

    Question Re: [2005] - Colouring Rows In DataGridView

    Hey jm,

    I tried the following combinations but it is not working as expected...

    Code:
    DataGridView2.Rows(I).DefaultCellStyle.BackColor = Color.Crimson
    - The row will flash red then return to transparent

    Code:
    DataGridView2.CurrentRow.DefaultCellStyle.BackColor = Color.Crimson
    - Returns and error message... Object not referenced to instance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width