Click here to Skip to main content
16,011,905 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 21:36
mveRichard MacCutchan24-Sep-11 21:36 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 7:02
sitebuilderLuc Pattyn24-Sep-11 7:02 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:21
ChrisDScott9324-Sep-11 9:21 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 9:26
sitebuilderLuc Pattyn24-Sep-11 9:26 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 23:13
ChrisDScott9324-Sep-11 23:13 
QuestionListview problem Pin
erickoronoh10kip23-Sep-11 7:30
erickoronoh10kip23-Sep-11 7:30 
AnswerRe: Listview problem Pin
Bert Mitton23-Sep-11 7:38
professionalBert Mitton23-Sep-11 7:38 
QuestionWhere and Why my row is not collored Pin
DeDelva23-Sep-11 3:19
DeDelva23-Sep-11 3:19 
Try
m_SelectedStyle = New DataGridViewCellStyle()
m_SelectedStyle.BackColor = Color.LightBlue
m_SelectedStyle.BackColor = SystemColors.Highlight
DataGridView1.ReadOnly = True
Dim SQLString As String = "SELECT id, bedrijfsnaam, startdatum, vervaldatum, omschrijving, netto, bruto, opmerkingen FROM Facturen"
Dim DataSet As New DataSet()
Dim OleDbDataAdapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(SQLString, oleConn)
oleConn.Open()
OleDbDataAdapter.Fill(DataSet, "Facturen")
DataGridView1.DataSource = DataSet.Tables("Facturen")
'here the colors starts
DataGridView1.Rows(1).DefaultCellStyle.BackColor = Color.Blue
Dim vandaag As String = Today
Dim i As Integer = 0
For Each row As DataGridViewRow In DataGridView1.Rows
If DataGridView1.Item(2, i).Value() = vandaag Then
DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.IndianRed
ElseIf DataGridView1.Item(2, i).Value() > vandaag Then
DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.LightGreen
End If
i = i + 1
Next
DataGridView1.AutoResizeColumns()
oleConn.Close()
Catch ex As Exception
blabla
End Try

Even if i try to just color without conditions it doesnt work something like:
DataGridView1.Rows(2).DefaultCellStyle.BackColor = Color.LightGreen



But whyyyyy....
AnswerRe: Where and Why my row is not collored Pin
Luc Pattyn23-Sep-11 3:32
sitebuilderLuc Pattyn23-Sep-11 3:32 
GeneralRe: Where and Why my row is not collored Pin
Scubapro23-Sep-11 3:49
Scubapro23-Sep-11 3:49 
AnswerRe: Where and Why my row is not collored Pin
DeDelva23-Sep-11 5:41
DeDelva23-Sep-11 5:41 
AnswerRe: Where and Why my row is not collored Pin
Scubapro23-Sep-11 3:48
Scubapro23-Sep-11 3:48 
GeneralRe: Where and Why my row is not collored Pin
DeDelva23-Sep-11 5:37
DeDelva23-Sep-11 5:37 
GeneralRe: Where and Why my row is not collored Pin
Scubapro25-Sep-11 21:31
Scubapro25-Sep-11 21:31 
QuestionImage Resizing Pin
eddieangel22-Sep-11 5:56
eddieangel22-Sep-11 5:56 
AnswerRe: Image Resizing Pin
Luc Pattyn22-Sep-11 7:47
sitebuilderLuc Pattyn22-Sep-11 7:47 
GeneralRe: Image Resizing Pin
eddieangel22-Sep-11 7:50
eddieangel22-Sep-11 7:50 
Questiondevenv.exe error Pin
DeDelva22-Sep-11 3:36
DeDelva22-Sep-11 3:36 
AnswerRe: devenv.exe error Pin
DaveAuld22-Sep-11 3:56
professionalDaveAuld22-Sep-11 3:56 
AnswerRe: devenv.exe error Pin
Luc Pattyn22-Sep-11 7:50
sitebuilderLuc Pattyn22-Sep-11 7:50 
QuestionSelect a particular item from listview and display it in various textboxes Pin
Lek Plepi22-Sep-11 1:31
Lek Plepi22-Sep-11 1:31 
AnswerRe: Select a particular item from listview and display it in various textboxes Pin
Lek Plepi23-Sep-11 21:29
Lek Plepi23-Sep-11 21:29 
QuestionSample project connect with Scanner Pin
kdakim21-Sep-11 23:20
kdakim21-Sep-11 23:20 
AnswerRe: Sample project connect with Scanner Pin
DaveAuld21-Sep-11 23:34
professionalDaveAuld21-Sep-11 23:34 
QuestionChange Column width from Datagridview without dataset Pin
DeDelva21-Sep-11 11:29
DeDelva21-Sep-11 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.