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. sort a dataset

sort a dataset

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
6 Posts 3 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.
  • A Offline
    A Offline
    ADY007
    wrote on last edited by
    #1

    how to sort a dataset?? i want to sort a column inside a dataset.

    Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

    A T 2 Replies Last reply
    0
    • A ADY007

      how to sort a dataset?? i want to sort a column inside a dataset.

      Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

      A Offline
      A Offline
      Atif Ali Bhatti
      wrote on last edited by
      #2

      hi, i would like to ask something before giving answer. would u like to sort the entire table with respect to a particular column or u just want to sort the column.

      A 1 Reply Last reply
      0
      • A ADY007

        how to sort a dataset?? i want to sort a column inside a dataset.

        Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

        T Offline
        T Offline
        thomasa
        wrote on last edited by
        #3

        You could create a DataView from the table you want to sort: DataSet ds = getMyDataSet(); DataView dv = new DataView(ds.Tables["theTableNameToSort"]); dv.Sort = "myCoulmnName ASC"; // if you want descending it go's: dv.Sort = "myCoulmnName DESC"; Hope it helps Thomas

        A 1 Reply Last reply
        0
        • T thomasa

          You could create a DataView from the table you want to sort: DataSet ds = getMyDataSet(); DataView dv = new DataView(ds.Tables["theTableNameToSort"]); dv.Sort = "myCoulmnName ASC"; // if you want descending it go's: dv.Sort = "myCoulmnName DESC"; Hope it helps Thomas

          A Offline
          A Offline
          ADY007
          wrote on last edited by
          #4

          how can i then send the dataview inside a dataset??

          Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

          T 1 Reply Last reply
          0
          • A ADY007

            how can i then send the dataview inside a dataset??

            Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

            T Offline
            T Offline
            thomasa
            wrote on last edited by
            #5

            Maby: ds.Tables["theTableNameToSort"] = dv.Table;

            1 Reply Last reply
            0
            • A Atif Ali Bhatti

              hi, i would like to ask something before giving answer. would u like to sort the entire table with respect to a particular column or u just want to sort the column.

              A Offline
              A Offline
              ADY007
              wrote on last edited by
              #6

              All i have is just one column. I need to sort it in ascending order. I need to use the dataset but.

              Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org

              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