Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Checkboxlist in datalist

Checkboxlist in datalist

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian22
    wrote on last edited by
    #1

    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 Function

    I 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?

    S 1 Reply Last reply
    0
    • I indian22

      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 Function

      I 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?

      S Offline
      S Offline
      SayreCC
      wrote on last edited by
      #2

      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.

      I 1 Reply Last reply
      0
      • S SayreCC

        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.

        I Offline
        I Offline
        indian22
        wrote on last edited by
        #3

        Only serialno of the particular product

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups