Sort - Data on Browser

Results 1 to 3 of 3

Thread: Sort - Data on Browser

  1. #1
    Join Date
    Dec 1969

    Default Sort - Data on Browser

    Is it possible to SORT the Data displayed on Brower?<BR>I have "EmpId, EmpName, EmpDate" Columns and around 170 rows of Data that i am displaying on browser using a SQL statement...<BR>I want to put a SORT option (making my column names as hyperlinks) and i do NOT want to use any SQL to Sort, how about a JavaScript? Can we do this?<BR>I just want to SORT the Data what ever on the IE Browser without going to Table or using any SQL? Please help me

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Easiest way will be going to db

    and of course the RIGHT way<BR><BR><BR>the alternate way will be to throw all the data into an array and then sort using the simple buble sort<BR><BR>Why dont you want to hit the db anyway<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Even easier

    Assuming you have all this data as an array of client-side JS objects and you have some familiarity of scripting the DOM, you can simply use the array&#039;s sort method to sort your objects by a given property value (whatever the user chooses, I guess - no need for custom-written sorting routines).<BR><BR>Then iterate through your array and re-create your table.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts