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 apply sorting in grid view field through codebehind

how to apply sorting in grid view field through codebehind

Scheduled Pinned Locked Moved ASP.NET
cssalgorithmstutorial
4 Posts 4 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
    anshu77
    wrote on last edited by
    #1

    how to apply sorting in grid view field through codebehind. and my gridview code is: SqlDataAdapter da = new SqlDataAdapter("select * from newcustomer ", con); con.Open(); DataTable ds = new DataTable(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.close();

    _ G 2 Replies Last reply
    0
    • A anshu77

      how to apply sorting in grid view field through codebehind. and my gridview code is: SqlDataAdapter da = new SqlDataAdapter("select * from newcustomer ", con); con.Open(); DataTable ds = new DataTable(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.close();

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

      You could have tried searching in google. Refer the links below: Articles: GridView Paging and Sorting[^] Gridview Sorting with Up and Down Icons, Paging[^] Discussions: Sorting data in Gridview by clicking on header column[^]

      Just shift & delete(Remember no backups), then you'll enjoy. ___________________________________________________ A little help through the tips and Articles 1. Application Login through Active Directory (LDAP) 2. Table Valued Parameters

      1 Reply Last reply
      0
      • A anshu77

        how to apply sorting in grid view field through codebehind. and my gridview code is: SqlDataAdapter da = new SqlDataAdapter("select * from newcustomer ", con); con.Open(); DataTable ds = new DataTable(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.close();

        G Offline
        G Offline
        gopal pradhan
        wrote on last edited by
        #3

        Use this link GridView Paging and Sorting[^]

        F 1 Reply Last reply
        0
        • G gopal pradhan

          Use this link GridView Paging and Sorting[^]

          F Offline
          F Offline
          fjdiewornncalwe
          wrote on last edited by
          #4

          My 1: Please read the existing answers and make sure you aren't reposting a link that already exists in another answer.

          I wasn't, now I am, then I won't be anymore.

          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