R
Roy
Hey all,
I have a "worker" page where users can click on checkboxes, fill in
notes, etc. I wish to "pre-check" the checkboxes if certain criteria are
met. I assume it must be done in the For loop shown below. The event in
this case is what event code is show in "event" field below.
Sub Binddata()
Dim myconn As New
SqlConnection("server=localhost;uid=name;pwd=password;database=test")
Dim tmpUID As Label
tmpUID = CType(Page.FindControl("uid"), Label)
myconn.Open()
Dim mycom As New SqlCommand("SELECT dates,note,event FROM L2_Test WHERE
cast(uid as nvarchar(40)) ='" & tmpUID.Text & "'", myconn)
Dim newadp As New SqlDataAdapter(mycom)
Dim newds As New DataSet
newadp.Fill(newds, "one")
notesgrid.DataSource = newds.Tables("one").DefaultView
myconn.Close()
notesgrid.DataBind()
Dim row As DataRow
For Each row In newds.Tables("one").Rows
Next
End Sub
I have a "worker" page where users can click on checkboxes, fill in
notes, etc. I wish to "pre-check" the checkboxes if certain criteria are
met. I assume it must be done in the For loop shown below. The event in
this case is what event code is show in "event" field below.
Sub Binddata()
Dim myconn As New
SqlConnection("server=localhost;uid=name;pwd=password;database=test")
Dim tmpUID As Label
tmpUID = CType(Page.FindControl("uid"), Label)
myconn.Open()
Dim mycom As New SqlCommand("SELECT dates,note,event FROM L2_Test WHERE
cast(uid as nvarchar(40)) ='" & tmpUID.Text & "'", myconn)
Dim newadp As New SqlDataAdapter(mycom)
Dim newds As New DataSet
newadp.Fill(newds, "one")
notesgrid.DataSource = newds.Tables("one").DefaultView
myconn.Close()
notesgrid.DataBind()
Dim row As DataRow
For Each row In newds.Tables("one").Rows
Next
End Sub