Results 1 to 12 of 12

Thread: [RESOLVED] adding colors in datagrid view

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2011
    Posts
    72

    Resolved [RESOLVED] adding colors in datagrid view

    Hi,

    I have a datagridview and there are several columns in it whose datatype is in date format. I want it to where if a person changes the date in a cell which is ALREADY colored, I want that color to change to white as soon as they click off of the cell.

    I have something like:

    Code:
     Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
    
    Me.DataGridView1.CurrentRow.Cells("DateDataGridView1").Style.BackColor = Color.White
    
        End Sub
    Last edited by c3p0; Sep 6th, 2011 at 04:20 PM.

Tags for this Thread

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