• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sorting multiple columns

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i've xsl, to display a table with 5 columns. i need to sort a particular column, upon clicking on the header of that particular column of the table. how to acheive this?
Thanks,
Bhaskar
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not quite an XSL issue. Functionality you want is usually achieved via JavaScript that is incorporated in HTML page. All your XSL stylesheet needs to do is to write this JavaScript in the output.
Also, rbhaskar, unfortunately your name doesn't comply with our official policy on registered names. Both first and last name are required. Please, take a moment and change your publicly displayed name. Other than that, we are glad to see you here.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mapraputa Is ,
I too am looking for a similar solution and I was eagerly waitng for the reply. I have given a search and was sirprised to know that thrice before the same question has been asked and everything else other than the solution is printed.
Can you please guide us with the solution.
Morever anyone can solve the Naming probelem of JavaRanch naming. WHY DOES NOT JAVARANCH DO IT? IS IT DIFFICULT ? EVEN I DONT FIND IT DIFFICULT!!!
Why cant we improve the code so that no one can register with wrong name?
Thanks and regards,
Milan Doshi
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is one solution:
http://javascript.internet.com/forms/sort-data-table.html
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You can post this question in hTML/javascript forum.As told by Map,you have to use javascript for this.

If u want some sample code,view this http://tech.irt.org/articles/js060/ or directly this http://tech.irt.org/articles/js060/generic.htm

U can try using <xsl:sort/>.If its confusing don't scold me
Sorry Map,I didn't noted ur reply.I was using old screen.
Ok! The above link works both in IE and netscape.
Map! I found this link is good have some examples on webservices with asp.net,propably u might know more than this :roll: asp.net

Regards
Balaji
[ June 25, 2002: Message edited by: Balaji Loganathan ]
 
ramaraju bhaskar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
thanks for the suggestions. my basic question is to findout any way to parametarize xsl:sort?
Thanks anyway for your support.
Bhaskar
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look at example https://coderanch.com/t/125023/XML/Keyword-xsl-sort-may-not you may get some idea on how to use xsl:sort or else you try to attempt some code and post it here if you face problem on running it.
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to parametrize sort:
<xsl:sort select=”*[name(.)=$sortField]">
 
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic