cancel
Showing results for 
Search instead for 
Did you mean: 

how to show icon in a column of a table?

Former Member
0 Kudos

How to display an icon in a column of a table UI element and this icon is to be displayed based on values in the table row?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi wei,

For inserting an icon inside the table

1)create a table with ur input fields,

2)next to the input field column insert a col with buttons.

3))in the buttons u can add ur image source so that it looks like an icon.

4)onAction() of the button give ur implementation.

Hope this helps u better,

Regards,

Nagarajan.

Answers (4)

Answers (4)

Former Member
0 Kudos

I normally use a calculated attribute inside the table's data source node for this.

Add an attribute "Icon", type=string, calculated=true, read-only=true, under the data source node.

(If the data source node uses structure binding and does not allow to add an attribute, add a helper value node instead, cardinality=1:1, selection=1:1, and add the attribute to this node.)

In the get-method for the calculated attribute, you get the node element corresponding to the table row as parameter. Depending on other attributes in this node element, select an icon URL and return it.

If you put your icons inside the src/mimes/<component> folder, you can simply return the file name of the icon.

Don't use a Button as table cell editor but rather an Image or LinkToAction.

Armin

Former Member
0 Kudos

The following answer is more or less helpful, but it still does not solve the problem. What I want is to display the icon beside the input field and both the icon and input field are in one cell.

====================================================

You can use the following as table cell editor:

1. Image -- just displays plain image

2. Caption -- dislays image along with text or image only (or text only).

3. LinkToAction -- same as caption, however provides you a way to have something like "onClick" action.

========================================================

Message was edited by: Wei Tang

Former Member
0 Kudos

Wei,

It is impossible to use pair of UI controls as single table cell editor. Using any kind of container (like IWDTransparentContainer) for cell editor is forbidden as well. So the answer is "NO WAY", either in NW 6.40 or 7.00.

So it is the only option to use 2 columns. In later versions (at least recent 7.0 builds) you may switch off vertical grid lines in table, so result looks like what you want.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

hi wei,

FOr adding icons check on to this link:

http://help.sap.com/saphelp_erp2005/helpdata/en/b6/ab3a7803ac11d4a73f0000e83dd863/frameset.htm

Hope this helps u,

Regards,

Nagarajan.

arun_srinivasan
Contributor
0 Kudos

hi

refer this threads it will be helpfull

hope it helps

regards,

Arun