Hi Santosh,
In similar situations I generally run sorts at the client - it requires no
additional server requests, and you don't overload the server with sort
jobs.
Create a JavaScript object to hold a single row in your table, then store
the objects in an Array. You'll need a compare function that compares the
selected column and a function to populate the table after sorting.
Chris Walker
Brainbench MVP for ASP
http://www.brainbench.com
> -----Original Message-----
> From: Salian, Santosh (GXS, TCS) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 28, 2000 11:25 PM
> To: [EMAIL PROTECTED]
> Subject: Sorting a Table based on any of the columns
>
>
> Hi ,
>
> I have a page to develop in which I need to display a table.
> The data for which is picked from Oracle database.
>
> But the user will be sorting that table based on any of the columns in
> asc./desc. order.
>
> Probably the easiest way to do this is querying the database
> n no. of times.
> But thats definitely not efficient.
>
> So are u aware of any way to have a (very) efficient code to
> incorporate
> this feature........
>
> Thanks and Regards,
> Santosh
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets