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. Other Discussions
  3. The Weird and The Wonderful
  4. header change on sort [modified]

header change on sort [modified]

Scheduled Pinned Locked Moved The Weird and The Wonderful
csstutorial
2 Posts 2 Posters 11 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
    sonia_basangar
    wrote on last edited by
    #1

    Hi i want to change the header on sort for example when i click the header of grid pax_name it schould change to pax_name(ASC) and so on Descending pax_name(Desc) i write code int he sortcommand event of the datagrid by using viewstate. Bind(); if(ViewState["SortOrder"].ToString() == "" || ViewState["SortOrder"].ToString() == "DESC") { dv.Sort = e.SortExpression; ViewState["SortExpression"]= e.SortExpression + "ASC"; ViewState["SortOrder"] = "ASC"; } else { dv.Sort = e.SortExpression + " DESC"; ViewState["SortExpression"]= e.SortExpression + " DESC"; ViewState["SortOrder"] = "DESC"; } dgHistory.DataBind(); -- modified at 3:20 Tuesday 24th April, 2007

    CPalliniC 1 Reply Last reply
    0
    • S sonia_basangar

      Hi i want to change the header on sort for example when i click the header of grid pax_name it schould change to pax_name(ASC) and so on Descending pax_name(Desc) i write code int he sortcommand event of the datagrid by using viewstate. Bind(); if(ViewState["SortOrder"].ToString() == "" || ViewState["SortOrder"].ToString() == "DESC") { dv.Sort = e.SortExpression; ViewState["SortExpression"]= e.SortExpression + "ASC"; ViewState["SortOrder"] = "ASC"; } else { dv.Sort = e.SortExpression + " DESC"; ViewState["SortExpression"]= e.SortExpression + " DESC"; ViewState["SortOrder"] = "DESC"; } dgHistory.DataBind(); -- modified at 3:20 Tuesday 24th April, 2007

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      This is Code Horros Forum, hence you (perhaps us?) missed something... :zzz:

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      In testa che avete, signor di Ceprano?

      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