cancel
Showing results for 
Search instead for 
Did you mean: 

Change table sort icon in the table header

Former Member
0 Kudos

<b>Can I change the icon of the table sorter in the table header.</b>The icon of up and down arrows are changed at run time like in abap.

Is there any way I can <b>change to the icon found at design time. </b>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The answer was very useful.

But the icon which was imported from a windows icon does not work.

And the icon is not persistent in the table header and

througout the columns. It shows up in front of the table header text.

It is not visible when the page is loaded.

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Vijay

Do you use auxilary TableSorter class? If so there are two fields for icons in the class:

		/**
		 * The asceding sorting image to be used.
		 */
		private String ascImage = "~sapicons/s_b_srtu.GIF";
		
		/**
		 * The descending sorting image to be used.
		 */
		private String dscImage = "~sapicons/s_b_srtd.GIF";

Best Regards

Sergei

Former Member
0 Kudos

Hi,

You can change the icons in TableSort.java file.

Following is the code snippet to be changed...

// set icon in currently sorted column

if ( currentlySortedColumn.getHeader() != null )

currentlySortedColumn.getHeader().setImageSource(reversable.isReversed()

? "~sapicons/s_b_srtd.GIF"

: "~sapicons/s_b_srtu.GIF");

Thanks & Regards,

Shiva Kumar

Former Member
0 Kudos

Hi,

Where can i add this peice of code in TableSorter Class.Please, Rply back i need to implement it.