AFrei Posted September 10, 2009 at 10:55 AM Report Share #286301 Posted September 10, 2009 at 10:55 AM Boas pessoal, quero pintar uma celula de uma coluna do tipo "Date" se esta não for preenchida. Eis o que tenho mas aparece-me o seguinte erro: A referência de objecto não foi definida como uma instância de um objecto Tenho que definir algo antes para o DBNull funcionar? Obg! If DataGridView1.Item(2, row).Value.Equals(DBNull.Value) Then With Me.DataGridView1.Rows(row).DefaultCellStyle BackColor = Color.Red End With End If Link to comment Share on other sites More sharing options...
fLaSh_PT Posted September 10, 2009 at 11:11 AM Report Share #286302 Posted September 10, 2009 at 11:11 AM Boas; Experimenta assim: If IsDBNull(DataGridView1.Item(2, row).Value) Then ..... Compr. Making the impossible possible and pwing the world on db at a time. Link to comment Share on other sites More sharing options...
AFrei Posted September 10, 2009 at 11:54 AM Author Report Share #286307 Posted September 10, 2009 at 11:54 AM Obg pela ajuda, assim safei-me 👍🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now