cancel
Showing results for 
Search instead for 
Did you mean: 

Table Control Row Highlight Problem

Former Member
0 Kudos

Hi,

When I am selecting a row of the table control, it is not getting highlighted and only the first row of the table remains highlighted.

There is no problem with the data handling. The table is binded to a context node and I am able to fetch the record of the selected row. Only problem is with "Row Highlighting". These are the properties which were already set (with default values).

Properties of table control:

FirstActualRow - 0

FirstVisibleRow - 0

FixedTableLayout - ' ' (Unchecked)

GridMode - Both

RowCount - -1

RowSelectable - 'X' (Checked)

ScrollableColCount - -1

SelectionChangeBehaviour - Auto

SelectionMode - Auto

I have also written some code in ONSELECT event, but i am not setting any property of table control. Just using binding of context node to internal table. I have also tried following piece of code but it did not work.

data lv_count type I.

lv_count = context_node->get_element_count( ).

context_node->set_lead_selection_index( lv_count ).

Regards,

Snehal

Edited by: wdafan on Mar 2, 2010 12:00 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Just using binding of context node to internal table.

Are you re-binding to the same context node that the Table UI element is bound to? If so that could explain the loss of the highlighted row. Such an action resets the internal rendering properties of the bound table.

Former Member
0 Kudos

Thank a lot Thomas.

Yes, absolutely. I am rebinding the internal table in WDDOMODIFY of my view1. But, I have to do this in my application. Because, when I am coming from view2 to view1, I need to fill in new values in the internal table. So, I wrote the code in WDDOMODIFY.

IF ( FIRST_TIME <> 'X' ).

wddoinit( ).

ENDIF.

The reason I wrote above code is as follows:

I have to show a list of sales orders in a table control on View1. After selecting the row, I am going to View2 and doing some modifications & then coming back to View1. My customer wants the list to get updated with the new sales orders which might get created in the mean time. That is why I have called wddoinit() inside of wddomodify() i.e. selecting the latest sales order list & displaying them on view1. But then this is not allowing me to highlight any other row??

Is it not possible that I explicitly highlight the selected row in ROWSELECT event?

Edited by: wdafan on Mar 2, 2010 4:03 PM

Former Member
0 Kudos

Hi,

You are making a call to wddoinit() inside wddomodifyview, It is not suggested to call hook methods directly,

instead the logic to fill data into table can be written inside a seperate method and you can call this method inside wddomodifyview instead of wddoinit.

Also to higlight the row, you can create an attribute in view which will keep track of last selected index of node ( selected row of table ) and when you navigate back to your main view you can use this attribute to call set_lead_selected_index method of node holding table data

Regards

Manas Dua

Former Member
0 Kudos

Hi,

Can anyone suggest the solution. a little uurgent

arjun_thakur
Active Contributor
0 Kudos

Hi Snehal,

Check the Selection Property of the node with which you have binded your table.

Edited by: Arjun Thakur on Mar 2, 2010 4:47 PM

Former Member
0 Kudos

Hi Arjun,

Cardinatlity - 0..n

Selection - 0..n

Former Member
0 Kudos

Hi

Are you writing any code in wddomodifyview which is setting the lead selection index of the node to first element ?

Check on this

Regards

Manas Dua

Former Member
0 Kudos

Hi Manas,

I have written some code in modify method, but im not setting any the lead selection index of the node to first element.