cancel
Showing results for 
Search instead for 
Did you mean: 

How to grey out lines of a table?

Former Member
0 Kudos

Hi All,

I have a tabel UI element and a delete button. When the user pushes the delete button, the currently marked line should get grayed out.

How can I do that?

Thanks, Johannes

Accepted Solutions (1)

Accepted Solutions (1)

vmadhuvarshi_
Contributor
0 Kudos

Johannes,

You can also use [this tutorial| ] to give any colour to your chosen table lines.

Vishwas.

Former Member
0 Kudos

Thats a great tutorial in deed. There's no class

com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign

in CE version 7.1, though.

Dies anybody know where I can find this class in 7.1?

Johannes

Former Member
0 Kudos

Hi,

To find this create a context attribute of type TableCellDesign

While creating the attribute SimpleType-> expand local dictionaries->com.sap.ide.webdynpro.uielementdefinitions->TableCellDesign

Make this as the type of your attribute.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Johannes,

I think it is clear to you that you need to bind the TableCellDesign of every row to your context attribute of type com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign.

I have done something like this

Current Situation

TableNode (0..n)

--- Attri1

--- Attri2

--- Attri New Situation : Introduce a new value node Color (1..1) singleton ture. Create a calculated value attribute calcCellDesign of type TableCellDesign. TableNode (0..n) Color(1..1) --calcCellDesign --- Attri1 --- Attri2 --- Attri

bind this Color.calcCellDesign to your table CellDesign of every column.

You need to create your logic inside the set and ge methods of the calcCellDesign .

For Example TableCellDesign.Standard or TableCellDesign.Grey to your set your calcCellDesign

Success

Answers (2)

Answers (2)

Former Member
0 Kudos

2 other questions:

1. Is there a way to mark a whole row (not each cell individually)?

2. Marking takes effect not until the user leaves the row. How can I have the row being marked as soon as the delete button was pressed (something like an update view function call at the end of the onActionDelete method)?

Thanks, Johannes

Former Member
0 Kudos

Hi,

You will need to set the enabled property of each TableCellEditor in that row. To do this, create a new attribute of type boolean under the node that is bound to the datasource property of the table. Bind this context attribute to the enabled property of each UI element (Inputfield, DropDowns etc.) that you have added to each column of the table. Finally, in the event-handler method for the "Delete" button, set this attribute to true for the node element at lead selection, something like this:


//Let's say the node is called TableData and the attribute is called "IsDeleted"
wdContext.nodeTableData().currentTableDataElement().setIsDeleted(true);

Regards,

Satyajit.