Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27019

[RESOLVED] Datagridview checkbox problem

$
0
0
Hello. Please bear with me I'm new to vb.net.
I have this datagridview problem.

Scenario:

My Database columns.
Code:

-isCleared (boolean)
-DateCleared (DateTime)

My DGV Columns:
Code:

-isCleared Column (CheckBox)
-DateCleared Column (Readonly Textbox)

My DGV will only accept edits.

What I want to accomplish in a row level (logic). I can't find the right DGV event to execute this logic.
Code:

if dgv.CurrentRow.Cells("IsCleared").Value = True then
  dgv.CurrentRow.Cells("DateCleared").Value = Date.Today
else
    dgv.CurrentRow.Cells("DateCleared").Value = nothing or dbnull?
end if


I tried experimenting with the DGV events I can't seem to make it work. All I get is a delayed effect.

Viewing all articles
Browse latest Browse all 27019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>