cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling the table UI element on adding a new line

Former Member
0 Kudos

Hi,

i have a table UI element which displays 5 records in default... i have a Toolbarbutton "Copy"... wen i select a record in the table and press copy ..the record gets copied and added as new record in the table display...its working fine..

but ..

what i need is ...onclick of the copy the table should scroll one record up and display the last record which got added and that record should be highlighted...

Can any one please provide the code for that...

Regards,

Anurupa

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Just use the firstVisibleRow property of the table to control this. You can setup a context attribute and bind it to this property of the table. That way whenever you want to override the scroll position, you can just change the value of this attribute.

Answers (1)

Answers (1)

Former Member
0 Kudos

You can also use SET_LEAD_SELECTION method of the context node to highlight the newly added context element.

Regards,

Satheesh.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> You can also use SET_LEAD_SELECTION method of the context node to highlight the newly added context element.

>

> Regards,

> Satheesh.

How does that address this question? Setting the lead selection doesn't change the scroll position. In fact you can set the lead selection to a row that isn't even within the visible range of the table display.

Former Member
0 Kudos

Hi Thomas,

I accept that this won't help in scrolling. But this will help in highlighting the new added row after the scroll is taken care of. I believe that it is also a part of the question.

Regards,

Satheesh.