SortableTable.sortColumn(...) should be configurable

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

SortableTable.sortColumn(...) should be configurable

Postby arazvi » Wed Jul 19, 2006 8:28 am

SortableTable.sortColumn(String) and
SortableTable.sortColumn(int) only sort ascending.

I need to be able to programmatically sort descending.

Can you please add this functionality ?

Asad
arazvi
 
Posts: 27
Joined: Mon Sep 05, 2005 4:07 am

Postby JIDE Support » Wed Jul 19, 2006 4:10 pm

You can try to use the method

Code: Select all
public void sortColumn(int column, boolean reset, boolean ascending)

on SortableTableModel.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33834
Joined: Sun Sep 14, 2003 10:49 am

Really ? What version ?

Postby arazvi » Thu Jul 20, 2006 5:55 am

What version of JIDE is this method in ? I did not see it in the JavaDocs for version jide.1.9.1.05.

Thank you.

Asad.
arazvi
 
Posts: 27
Joined: Mon Sep 05, 2005 4:07 am

Ignore last message

Postby arazvi » Thu Jul 20, 2006 8:28 am

Sorry...Was looking at SortableTable instead of SortableTableModel :roll:
arazvi
 
Posts: 27
Joined: Mon Sep 05, 2005 4:07 am

Re: SortableTable.sortColumn(...) should be configurable

Postby Kalyani » Wed Nov 16, 2011 4:58 am

Hi,
I am trying to sort a column using the below code.
SortableTable sortableTable = new SortableTable(portfolioGrid.getModel());
sortableTable.sortColumn("Weight");

Here portfolioGrid -> JideTable
1st column in that table is "Weight".
I have added the JideTable via the JIDE Palette in GUI Builder of Netbeans.

But this is not working. I have tried everything. Could you please help ??
Kalyani
 
Posts: 10
Joined: Fri Nov 11, 2011 12:59 am

Re: SortableTable.sortColumn(...) should be configurable

Postby JIDE Support » Wed Nov 16, 2011 11:39 am

It does work for me. Attached is the test case FYI. Please share with us a test case if you still have the issue.

Thanks,
Attachments
SortableTableDemo.java
(15.54 KiB) Downloaded 232 times
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33834
Joined: Sun Sep 14, 2003 10:49 am

Re: SortableTable.sortColumn(...) should be configurable

Postby Kalyani » Thu Nov 24, 2011 4:37 am

Ya I got it to work .. :D
Just 2 more questions -
1) Am getting a character sort . In the sense if i enter 3 numbers - 123,12 and 33. Ascending Sort returns -> 12,123 and 33. Could you please help me get a complete numeric sort.
2) How do i get the null values to appear in the bottom ( irrespective of ascending and descending ) ? . I am entering 3 values in a 15 row table. On clicking on the table header to sort, the 3 values go to the bottom of the table.

Thanks for your help :)
Kalyani
 
Posts: 10
Joined: Fri Nov 11, 2011 12:59 am

Re: SortableTable.sortColumn(...) should be configurable

Postby Kalyani » Thu Nov 24, 2011 5:38 am

Also i am unable to add a new column dynamically to Sortable Table.
None of the wrappers above it also have this functionality.
I need to add a new column programmicatilly to the SortableTable.
Kindly help.
Kalyani
 
Posts: 10
Joined: Fri Nov 11, 2011 12:59 am

Re: SortableTable.sortColumn(...) should be configurable

Postby JIDE Support » Thu Nov 24, 2011 7:32 am

To realize both your goals, please use ObjectComparatorManager#registerComparator() to register a customized comparator for the column. You would also need let SortableTableModel#getColumnComparatorContext() to return the corresponding comparator context you have registered.

Thanks,
Kalyani wrote:Ya I got it to work .. :D
Just 2 more questions -
1) Am getting a character sort . In the sense if i enter 3 numbers - 123,12 and 33. Ascending Sort returns -> 12,123 and 33. Could you please help me get a complete numeric sort.
2) How do i get the null values to appear in the bottom ( irrespective of ascending and descending ) ? . I am entering 3 values in a 15 row table. On clicking on the table header to sort, the 3 values go to the bottom of the table.

Thanks for your help :)
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33834
Joined: Sun Sep 14, 2003 10:49 am

Re: SortableTable.sortColumn(...) should be configurable

Postby JIDE Support » Thu Nov 24, 2011 7:34 am

Please give JIDE CalculatedTableModelDemo a try for adding columns dynamically.

Thanks,
Kalyani wrote:Also i am unable to add a new column dynamically to Sortable Table.
None of the wrappers above it also have this functionality.
I need to add a new column programmicatilly to the SortableTable.
Kindly help.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33834
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest