I have a datagrid that I am populating, and on my tab and I have a
select/Deselect all checkboxes. The only column in my grid that is
readable is the first column and it is a bit field displaying
checkboxes. I want to cycle through and select/deselect the datagrid
items based on either the Select/Deselect checkboxes on the form.
Dim strSelect As String = "SELECT bUpdateToMaster, sEmployeeID,
sAddress, sCity, sState, sZip, sVoicePhone, sEmergContactPerson,
sEmergContactPhone, sEmergContactRel FROM tblPREE"
Dim strConnections As String
strConnections = "Data Source=" + DATASOURCE + ";Initial
Catalog=SIP_Time_Sheet;user id =" + USERID + "; password=" +
PASSWORD
' Create the SqlDataAdapter.
daEmp = New SqlDataAdapter(strSelect, strConnections)
daEmp.SelectCommand.CommandType = CommandType.Text
daEmp.SelectCommand.CommandText = strSelect
' Fill the DataSet.
dt_EmpApprove = New DataTable("tblpree")
daEmp.Fill(dt_EmpApprove)
' No loops, so I'm being lasy - Will come back and fix this
later
dt_EmpApprove.Columns.Item(0).ReadOnly = False
dt_EmpApprove.Columns.Item(1).ReadOnly = True
dt_EmpApprove.Columns.Item(2).ReadOnly = True
dt_EmpApprove.Columns.Item(3).ReadOnly = True
dt_EmpApprove.Columns.Item(4).ReadOnly = True
dt_EmpApprove.Columns.Item(5).ReadOnly = True
dt_EmpApprove.Columns.Item(6).ReadOnly = True
dt_EmpApprove.Columns.Item(7).ReadOnly = True
dt_EmpApprove.Columns.Item(8).ReadOnly = True
dt_EmpApprove.Columns.Item(9).ReadOnly = True
' Bind the DataGrid control to the dt_EmpApprove DataTable.
grdApprove.SetDataBinding(dt_EmpApprove, "")
Thanks,
Derek
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com