Checkboxlist in datalist
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
Public Function PopulateList() As DataSet
Dim cmd As New SqlCommand("select qt.department as dept, qt.custid as cusid, q.qotranid as qotranid,q.qoid as qoid,q.productid as proid,q.productname as pname,q.description as descr,q.qnty as qnty,q.price as price,q.tax as tax,q.total as total from quotation q ,quotetran qt where q.qotranid='" & ddlqo.SelectedItem.Text & "' and qt.qotranid='" & ddlqo.SelectedItem.Text & "' ", myConnection6) myConnection6.Open() Dim myDataReader As SqlDataReader myDataReader = cmd.ExecuteReader() While (myDataReader.Read()) = True pid = myDataReader("proid") Dim ad As New SqlDataAdapter("SELECT q.productid,s.productid,s.serialno as serialno from stockserialno s,quotation q where q.qotranid='" & Trim(ddlqo.SelectedItem.Text) & "' and q.productid=s.productid and s.status='A' and s.productid='" & productid1.Text & "' ", myConnection3) ad.Fill(ds1, "stockserialno") End While myDataReader.Close() myConnection6.Close()
Return ds1
End FunctionI have tried above code but it display all the items in every row,but I need to display only those items that coresponding to paricular row.how can i do that?
-
Public Function PopulateList() As DataSet
Dim cmd As New SqlCommand("select qt.department as dept, qt.custid as cusid, q.qotranid as qotranid,q.qoid as qoid,q.productid as proid,q.productname as pname,q.description as descr,q.qnty as qnty,q.price as price,q.tax as tax,q.total as total from quotation q ,quotetran qt where q.qotranid='" & ddlqo.SelectedItem.Text & "' and qt.qotranid='" & ddlqo.SelectedItem.Text & "' ", myConnection6) myConnection6.Open() Dim myDataReader As SqlDataReader myDataReader = cmd.ExecuteReader() While (myDataReader.Read()) = True pid = myDataReader("proid") Dim ad As New SqlDataAdapter("SELECT q.productid,s.productid,s.serialno as serialno from stockserialno s,quotation q where q.qotranid='" & Trim(ddlqo.SelectedItem.Text) & "' and q.productid=s.productid and s.status='A' and s.productid='" & productid1.Text & "' ", myConnection3) ad.Fill(ds1, "stockserialno") End While myDataReader.Close() myConnection6.Close()
Return ds1
End FunctionI have tried above code but it display all the items in every row,but I need to display only those items that coresponding to paricular row.how can i do that?
-
Hi, what are those field do you want to display?
Hope this one can help. Thanks Hi, Please select Good Question if my answer are fit to your Question.