Hi guys, I just want to know on how will I add a Checkbox in each row of my datagridview. First I used a datatable to get all the values from my database and then pass it all to the datagridview. What I want to happen is at the first column of my datagridview there is the checkbox. Here's my code..
dtfinal = New DataTable
sda = New SqlDataAdapter("SELECT k.EMPL_ID,m.EMPL_LNAME + ', ' + EMPL_FNAME AS NAME,k.KPIPOSTCODE AS 'POSITION',k.YEARNUM,k.MONTHNUM,k.WKNUM,k.KRAWEEKGRADE,k.STATUS,k.ISOVERRIDE,k.PREV_KRAWEEKGRADE FROM KRAWEEK k JOIN KEMPMASTER m ON k.EMPL_ID = m.EMPL_ID WHERE k.STATUS='" & "FINAL" & "' ORDER BY YEARNUM,MONTHNUM,WKNUM", sqlcon)
sda.Fill(dtfinal)
If dtfinal.Rows.Count <> 0 Then
dg4.DataSource = dtfinal
Else
dg4.DataSource = ""
End If