cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistency in table cell design binding

Former Member
0 Kudos

Hi All,

I have a strange issue. I have a table in which i am coloring the cells based on certain condition. Upon execution of a method , the color should change.

However color changes sometimes and sometimes it does not happen. For the times it doesn't not happen, the changes take effect after i refresh the window.

I have debugged and checked, the data is being populated properly and binding is also done.

Your help is appreciated.

Thanks,

Pris.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks, issue resolved by adding a line in the code.

Former Member
0 Kudos

Yes Kris, in every case i am getting the proper data before binding. SInce i am only chnaging the color, when it doesnot work, the color remains in the same state and does not change to the next color.

Former Member
0 Kudos

Hi,

Kindly paste your code.

Cheers,

Kris.

Former Member
0 Kudos

Hi Kissnas,

I am assigning the color based on the value set for the cell. As i have checked in debugging, the code is working fine.

I see the problem while passing the value to the node . As i am only updating the color (from one color to another) and other details in the node remain same.

Is it possible that the bind_table does not get exectued. (There is no condition on bind_table) .

or Since only color chnage is done, is there any lag/ delay required before doing bind/talbe.

Hi Sanasrinivas ,

Yes, i have the color coding part in my INIT method also. So, it will execute again on refresh.

Really appreciate you help to solve this issue.

Thanks,

Pris

Former Member
0 Kudos

Hi,

Before bind table if your logic is working perfectly. you wil get result.

Check in debugging before bind table code is working or not. you are saying some times is not working.. check when it is not working. what is happening??

Cheers,

Kris.

Former Member
0 Kudos

Hi,

Check ahve you follow same or not..

Create one attribute of type WDUI_TABLE_CELL_DESIGN and bind this table column celldesign property.

Based on condition you want design cell color..

code like this... i am using dropdown in one column, based on value select in this i am coloring cell.

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' ).
* get all declared attributes
  lo_el_segment1->get_static_attributes(
    IMPORTING
      static_attributes = ls_segment1 ).

  DATA : lv_dropdown type string .
  data desnval type WDUI_TABLE_CELL_DESIGN.
lv_dropdown =  ls_segment1-segment.

  if lv_dropdown = 1.
    desnval = cl_wd_table_column=>e_cell_design-badvalue_medium.
  endif.
  if lv_dropdown = 2.
    desnval = cl_wd_table_column=>e_cell_design-criticalvalue_medium.
  endif.
  if lv_dropdown = 3.
    desnval = cl_wd_table_column=>e_cell_design-key_medium.
  endif.

Cheers,

Kris.

former_member199125
Active Contributor
0 Kudos

Hi

As we dont know about your coding completely,Just analyze your code once again, once you refresh the window,will your color code part executes again?

Regards

Srinivas