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
questiondatabasehelptutorial
5 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

    How to get the values from database for checkboxlist in the datalist? I have tried something but it display only final record? I want to display all items of particular record? How can I do? plz help me

    C 1 Reply Last reply
    0
    • I indian22

      How to get the values from database for checkboxlist in the datalist? I have tried something but it display only final record? I want to display all items of particular record? How can I do? plz help me

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Perhaps if you posted an example of the data and the code, so we can understand what you mean ?

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      I 1 Reply Last reply
      0
      • C Christian Graus

        Perhaps if you posted an example of the data and the code, so we can understand what you mean ?

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

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

        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")
                Return ds1
            End While
            myDataReader.Close()
            myConnection6.Close()
        
        End Function
        
        C 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")
                  Return ds1
              End While
              myDataReader.Close()
              myConnection6.Close()
          
          End Function
          
          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          indian22 wrote:

          Return ds1

          Well, what do you think this will do ? Duh. You return, and the function ends.

          Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

          I 1 Reply Last reply
          0
          • C Christian Graus

            indian22 wrote:

            Return ds1

            Well, what do you think this will do ? Duh. You return, and the function ends.

            Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

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

            I have tried but it display all the items in every row,but I need to display only those items that coresponding to paricular row

            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