K
kenil keny
Guest
hi was trying to make application using your video
Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter Part 1/2 & 2/2
but I am encountering this problem
can you help me with the same
Private Sub reset()
Dim txts As TextBox = txtsearch
With txts
.Text = ""
.Select()
.BackColor = Color.LightCyan
End With
cboDfColor.SelectedItem = "Mistyrose"
cboAltColor.SelectedItem = "gold"
cboDfColor.BackColor = Color.LightCyan
cboAltColor.BackColor = Color.LightCyan
If DataGridView1.DataSource Is Nothing Then
Exit Sub
End If
Dim dgv1 As DataGridView = DataGridView1
With dgv1
.RowsDefaultCellStyle.BackColor = Color.FromName(cboDfColor.SelectedItem)
(SHOWING ERROR HERE
Key cannot be null.
Parameter name: key)
.AlternatingRowsDefaultCellStyle.BackColor = Color.FromName(cboAltColor.SelectedItem)
End With
End Sub
Continue reading...
Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter Part 1/2 & 2/2
but I am encountering this problem
can you help me with the same
Private Sub reset()
Dim txts As TextBox = txtsearch
With txts
.Text = ""
.Select()
.BackColor = Color.LightCyan
End With
cboDfColor.SelectedItem = "Mistyrose"
cboAltColor.SelectedItem = "gold"
cboDfColor.BackColor = Color.LightCyan
cboAltColor.BackColor = Color.LightCyan
If DataGridView1.DataSource Is Nothing Then
Exit Sub
End If
Dim dgv1 As DataGridView = DataGridView1
With dgv1
.RowsDefaultCellStyle.BackColor = Color.FromName(cboDfColor.SelectedItem)
(SHOWING ERROR HERE
Key cannot be null.
Parameter name: key)
.AlternatingRowsDefaultCellStyle.BackColor = Color.FromName(cboAltColor.SelectedItem)
End With
End Sub
Continue reading...