cancel
Showing results for 
Search instead for 
Did you mean: 

removing sorting icons from Table

Former Member
0 Kudos

Hello,

I am implementing the Table Sorter. Its working fiine. Requirement is not to show the sorting icons, but sorting should work. Does anybody have any idea on how to achieve this?.

Thanks,

Sunita.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just change the TableSorted class. Or do you already use the new Table.onSort event?

Armin

Former Member
0 Kudos

Armin,

I am on 04s SP10. I am using Tablesorter.Java class for sorting the columns. I have a 6 column table, in that I need to sort 4 cols. But I shouldnt show them the sorting icons. I am using Table.onsort event, I followed Betram Ganz's web log on how to use it. What do I need to change TableSorted class and where do I need to do that?.

Thanks for help,

Sunita.

Former Member
0 Kudos

When using the new Table.onSort event, the icons are provided automatically depending on the value of property TableColumn.sortState. Setting sortState=NONE suppresses the icon.

But why do you want to change this at all?

Armin

Former Member
0 Kudos

Armin,

Thats Client's UI requirement. I already have sortState=NONE, but in the modifyView method, this is what I have:

if (firstTime) {

// view.nowCreateAllCustomExtensionFields();

IWDTable table = (IWDTable) view.getElement("OpportunityTable");

wdContext.currentContextElement().setOppSearchTableSorter(

new TableSorter(table, wdThis.wdGetSortColumnsAction(), null, new String[]{"oppName","customer","status","contraDate"}));

Is this causing the icons to be displayed?. The Icons are still displayed. What else I need to change it?.

Thanks for help,

Sunita.

Former Member
0 Kudos

I don't know what the TableSorter class does exactly, but probably it binds the "sortDirection" to a suitable context attribute which would show the icons again. Maybe you can have a look at your TableSorter implementation and check this.

Armin

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sunita,

I think you used Table Sorter java class.

So go to the java class and find the below code.

// set icon in currently sorted column

if (currentlySortedColumn.getHeader() != null)

currentlySortedColumn.getHeader().setImageSource(

reversable.isReversed()

? "Asd.jpg"

: "dec.jpg");

so, just remove the .jpg in the coding and put null.

Former Member
0 Kudos

Anoop,

In the Tablesorter.java class there is no code like you mentioned.

Sunita.

Former Member
0 Kudos

Hi sunita,

for sorting you are to include TableSorter java class.

just open the class by using notepad and change code as i mentioned in my previous reply.

I have implemented this already.

Former Member
0 Kudos

Hi Sunita,

when you write a code in WdDoModifyView()...

if(!firstTime)

{

....

}

do not keep the code in if loop. keep the code as a statements..then you do not see sorting icon ..it works for me!

Try it

Regards

Ravi

luciano_leitedasilva
Contributor
0 Kudos

Hi Sunita,

Let me see if I understand your requirements. Do you want to use the Sort functionality but without the icons in the table? For instance, you want to do the table sort when this table is loaded, is it?

When you are designing the table you can take away with the icons funcionality leaving the table sort functionality.

Leave the table element without an event associated and mark all columns sortState propertie as not sortable.

Call the method to sort the table after populate the node.

Regards.

Luciano

Former Member
0 Kudos

Hi Sunita,

I dont think that is possible. Those icons show you if it is sorting ascending or descending. I dont think we can possibly hide them.

--MLS