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. Dataview sort not working

Dataview sort not working

Scheduled Pinned Locked Moved ASP.NET
algorithmshelp
2 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.
  • S Offline
    S Offline
    shivarishxxxx
    wrote on last edited by
    #1

    Hi, Am assigning a dataset to dataview and trying to sort dataview. But, its not sorting. DataView dv = new DataView(DataSet.Tables[0]); dv.Sort = "ColName"; Please help me as this is urgent.

    rmr

    K 1 Reply Last reply
    0
    • S shivarishxxxx

      Hi, Am assigning a dataset to dataview and trying to sort dataview. But, its not sorting. DataView dv = new DataView(DataSet.Tables[0]); dv.Sort = "ColName"; Please help me as this is urgent.

      rmr

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      The DataView doesn't sort the DataTable. Make sure that you are not still referencing the DataTable object, because the DataTable will still NOT be sorted. You will have to reference the DataView object to utilize the sorting. Otherwise your code looks okay, so if you need more help you'll have to give us some more information about how you are using the DataView object after you sort it. Hope this helps.

      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