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. How to sort GridView but not via SQL or a datatable VB 2010

How to sort GridView but not via SQL or a datatable VB 2010

Scheduled Pinned Locked Moved ASP.NET
databasecsstutorialquestion
3 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.
  • Q Offline
    Q Offline
    QuickBooksDev
    wrote on last edited by
    #1

    We have a VB 2010 ASPX program with a GridView that needs to support sortable columns. There is no database. Is there a way to just sort the entire grid based on 1 column without redoing the entire grid? Do we have to use a DataTable as sort that?

    B 1 Reply Last reply
    0
    • Q QuickBooksDev

      We have a VB 2010 ASPX program with a GridView that needs to support sortable columns. There is no database. Is there a way to just sort the entire grid based on 1 column without redoing the entire grid? Do we have to use a DataTable as sort that?

      B Offline
      B Offline
      Blikkies
      wrote on last edited by
      #2

      How do you bind/add values to your gridview?

      F 1 Reply Last reply
      0
      • B Blikkies

        How do you bind/add values to your gridview?

        F Offline
        F Offline
        Forbiddenx
        wrote on last edited by
        #3

        My guess is you can create a datatable hard coded out of the data you do have and then sort on that. You also could use generics and inherit icomparable and then use the sort method in that custom data class. My suggestion would be datatable will be easier.. And then run .sort on it.

        =)

        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