Results 1 to 1 of 1
Thread: Problem with sorting Table
- 02-08-2008, 02:21 PM #1
Member
- Join Date
- Jan 2008
- Posts
- 4
- Rep Power
- 0
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>
Similar Threads
-
Sorting JTable (Vectors) Problem
By ramapple in forum AWT / SwingReplies: 6Last Post: 07-06-2009, 11:15 PM -
sorting problem...
By mark-mlt in forum New To JavaReplies: 4Last Post: 04-17-2008, 02:15 PM -
Problem with jTable that is binded with a table in MySQL Database
By rajkenneth in forum NetBeansReplies: 0Last Post: 03-29-2008, 03:36 PM -
sorting problem
By mcal in forum New To JavaReplies: 1Last Post: 02-14-2008, 08:13 AM -
Problem with applying Sql order by to html table
By sireesha264 in forum Advanced JavaReplies: 2Last Post: 02-04-2008, 10:20 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks