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. sorting

sorting

Scheduled Pinned Locked Moved ASP.NET
questioncssalgorithms
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.
  • P Offline
    P Offline
    ptvce
    wrote on last edited by
    #1

    i have a field wth name (active). it is bool.i fill a datagrid with name , lname and active but i want that record has active = true be in first row of data grid . how can i sort it in pageloade? can i use order b active?

    _ S 2 Replies Last reply
    0
    • P ptvce

      i have a field wth name (active). it is bool.i fill a datagrid with name , lname and active but i want that record has active = true be in first row of data grid . how can i sort it in pageloade? can i use order b active?

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Can't you get the data from the database itself in the order you want?

      Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • P ptvce

        i have a field wth name (active). it is bool.i fill a datagrid with name , lname and active but i want that record has active = true be in first row of data grid . how can i sort it in pageloade? can i use order b active?

        S Offline
        S Offline
        Stephan Pilz
        wrote on last edited by
        #3

        Dont fill it from System.Data.DataTable. Create a view System.Data.DataView and set the Sort-Property. BR Stephan

                       \\\\\\|///
                     \\\\  - -  //
                      (  @ @  )
        

        +---------------oOOo-(_)-oOOo-----------------+
        | Stephan Pilz stephan.pilz@stephan-pilz.de |
        | www.stephan-pilz.de |
        | ICQ#: 127823481 |
        +-----------------------Oooo------------------+
        oooO ( )
        ( ) ) /
        \ ( (_/
        \_)

        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