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. DataGrid Sortcommand doesn't work

DataGrid Sortcommand doesn't work

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

    Hi, I have a datagrid with sorting turned on. The datagrid sort event used to fire when I pressed the header but the column header but now it doesn't work anymore. Anyone with any idea why? Rickard

    M 1 Reply Last reply
    0
    • R RickardB

      Hi, I have a datagrid with sorting turned on. The datagrid sort event used to fire when I pressed the header but the column header but now it doesn't work anymore. Anyone with any idea why? Rickard

      M Offline
      M Offline
      Marcie Jones
      wrote on last edited by
      #2

      RickardB wrote: The datagrid sort event used to fire when I pressed the header but the column header but now it doesn't work anymore. Anyone with any idea why? Could be any number of things. Here are some guesses without seeing your code: 1) Your SortCommand handler could be missing (OnSortCommand if using inline script, Handles clause in VB.NET codebehind, += event thing in C#) 2) Your columns might not have a SortExpression set. 3) You could have disabled ViewState for the page or the control. 4) You could have databinding code in Page_Load without checking for IsPostBack. 5) You could have clicked the sorting links too many times and wore them out :) I could probably come up with a few more hypothetical scenarios, but it would be much easier if you showed us the code and asked why doesn't this code sort? :) Datagrid Girl http://www.codeproject.com

      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