Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-08-2008, 04:21 PM
Member
 
Join Date: Jan 2008
Posts: 4
sireesha264 is on a distinguished road
Problem with sorting Table
Hi To All,

I am having table,I am doing the sorting for this table using sql query order by.

I have the code when i click on radi button with value="1",it is soring the table by ascending,and if click on the radio button with value="2",
it is sorting in descending order.

I want the code like,If i click on the arrow,Sorting should happen.Like if the records are in ascending order arow should be up and if i click on descending order arow should be down.


can any body give me the idea.

My code is as follows.


<table>
<th>
<td >TestCase Name
<select name="<%= TestCasesData.SORT_BY%>0">
<option value="1" <%= (filterObject.getSortBy1()==1)? "selected":"" %>>TestCase Name</option>
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="1" <%= (filterObject.getAscDesc1()== 1)? "checked":"" %>>asc
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="2" <%= (filterObject.getAscDesc1()== 2)? "checked":"" %>>desc
</td>

<td>Created by
<select name="<%= TestCasesData.SORT_BY%>0">
<option value="1" <%= (filterObject.getSortBy1()==1)? "selected":"" %>>TestCase Name</option>
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="1" <%= (filterObject.getAscDesc1()== 1)? "checked":"" %>>asc
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="2" <%= (filterObject.getAscDesc1()== 2)? "checked":"" %>>desc
</td>
<td>Created Date
<select name="<%= TestCasesData.SORT_BY%>0">
<option value="1" <%= (filterObject.getSortBy1()==1)? "selected":"" %>>TestCase Name</option>
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="1" <%= (filterObject.getAscDesc1()== 1)? "checked":"" %>>asc
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="2" <%= (filterObject.getAscDesc1()== 2)? "checked":"" %>>desc
</td>
</th>
<tr><td>--</td></tr>
<tr><td>--</td></tr>
<tr><td>--</td></tr>

</table>
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting problem... mark-mlt New To Java 4 04-17-2008 04:15 PM
Problem with jTable that is binded with a table in MySQL Database rajkenneth NetBeans 0 03-29-2008 05:36 PM
sorting problem mcal New To Java 1 02-14-2008 10:13 AM
Sorting JTable (Vectors) Problem ramapple AWT / Swing 5 02-05-2008 10:54 AM
Problem with applying Sql order by to html table sireesha264 Advanced Java 2 02-04-2008 12:20 PM


All times are GMT +3. The time now is 11:23 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org