cancel
Showing results for 
Search instead for 
Did you mean: 

Define TableCellEditor for row rather than column - is this possible?

Former Member
0 Kudos

I have a table which I would like to print row-wise, rather than column-wise.

An example would be where I wish to compare two items, side-by-side, so I would have two columns, where the first row displays the Part Number, the second row shows the item image, ... etc.

Is this scenario possible in Web Dynpro? Is it possible to define a table cell editor on a row/cell rather than per column?

Walter

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Walter,

see the documentation, there are some procedures how to implement it:

http://help.sap.com/saphelp_nw2004s/helpdata/en/c1/fa7842fdb70f53e10000000a155106/frameset.htm

Kind Regards

Stefanie

Former Member
0 Kudos

Walter,

Sent it to you..some time back.

~ Bala

Answers (2)

Answers (2)

Former Member
0 Kudos

Walter,

Create a table and bind its dataSource to a suitable node. Insert two columns, say col1 and col2. For each of the columns, do the following two steps:

1. a) Right click the column and choose "Insert Cell Variants" --> "Table Standard Cell" and specify a variantKey (say,key).

1. b)Right click the "Table Standard Cell" and choose "Insert Editor" and choose "Image" UI element. Do the proper data binding for the imageSource property of the image.

2. Right click the column and choose "Insert Table Cell Editor" and choose "TextView" UI element. As usual, bind the text property of the TextView to suitable attribute, in your case it is Part Number.

Now you create a value attribute (say, v1, outside the node to which the table's datasource is bound.) and bind it to the column's "selectedCellVariant" property.

Then, whenever you are populating the elements / filling up the table, you have to check what is the UI element that you want to display, Image or TextView..

Once you know that you have to display an Image for a row, set the v1 to "key" (i.e the variantKey you had specified for the Table Standard Cell).

If you want to display the Text View, then set the value of v1 to "".(Empty String).

You are done..I have developed a sample working example for this and incase you are interested in it, you may send me an e-mail.

Good luck,

~ Bala

Former Member
0 Kudos

Thanks,

I will try this.

Walter

Former Member
0 Kudos

Hi Bala,

The "key" thing is baffling me... I do not understand where to place the context attribute...

I would be very grateful if you could send me your working example.

Thanks,

Walter

Former Member
0 Kudos

Walter,

Yes. It is possible. You may use the "CellVariant" for doing it. But, this option is available ONLY in NW2004s..If you are using any version which is < than NW2004s, then it is NOT possible.

~ Bala

Former Member
0 Kudos

Hi Bala,

Yes, we are using NW04s. Could you expand on how to go about using a CellVariant?

Walter