cancel
Showing results for 
Search instead for 
Did you mean: 

When Editing a cell the cell should be light colour in a table webdynpro

mahesh_jagnani
Participant
0 Kudos

Hi Experts,

I have a requirement where When Editing a cell the cell should be light colour in a table.

Please let me know how we can do this.

Thanks'

Mahesh

Accepted Solutions (0)

Answers (3)

Answers (3)

mahesh_jagnani
Participant
0 Kudos

OK

Former Member
0 Kudos

HI ,

There are ways to highlight a table cell, apply a different color,Request focus etc.

But I dont think there is any event which is triggered when you start to edit a particular cell.

So I doubt if you can achieve what you have set to.

Anyways,wait for other experts to have their say.

Thanks,

Aditya.

Former Member
0 Kudos

Hi,

To Coloring table cell follow this...

Create a context attirbute for CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN to the node to which the table is bound.

Bind this attribute to the CELL_DEISGN property of table column wich you want to set color.

data desnval type WDUI_TABLE_CELL_DESIGN.

DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.

DATA lo_el_segment1 TYPE REF TO if_wd_context_element.

DATA ls_segment1 TYPE wd_this->Element_segment1.

data lt_segment1 type wd_this->elements_segment1.

DATA lv_segment TYPE wd_this->Element_segment1-segment.

data lr_column type ref to cl_wd_table_column.

  • navigate from <CONTEXT> to <SEGMENT1> via lead selection

lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).

  • get element via lead selection

lo_el_segment1 = lo_nd_segment1->get_element( ).

lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).

// Here Based on some condition or when you edit try to fill colors.

desnval = cl_wd_table_column=>e_cell_design-badvalue_medium.

desnval = cl_wd_table_column=>e_cell_design-criticalvalue_medium.

For possible colors go through this..

http://help.sap.com/saphelp_nw70/helpdata/en/45/0ef14d9d942462e10000000a1553f7/frameset.htm

Cheers,

Kris.