cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Rownumber in Table?

Former Member
0 Kudos

Hello Guys,

I got a little problem with the Tables i use in my webdynpro application. I have added a sorting functionallity to every table in my project so that the user can sort the displayed data in the table.

All this tables have only between 5 or 10 visible rows but there are normally up to 20 rows displayed in these tables.

So now to the problem, if the user uses the up and down buttons to go trough the rows in the table the rowCount changes in the bottombar of the table, if he now presses the sort button in the tableheader the table will be sorted but it will not jump up to the first row of the table. So i see the actual range of rows which where selected and not the top 5 in my case.

I have tried to set the leadselection of the node but this doesnt solve my problem, yet.

Does anyone have an idea?

Best regards,

Andre

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Andre,

Create a context attribute (say visRow) of type Integer and bound it to your table's property firstVisibleRow

Now you can set the context attribute as per your need.

e.g.

wdContext.currentContextElement().setVisRow(5);

Now your table shows from row-5 onwards.

Regards,

Siva

Answers (2)

Answers (2)

Former Member
0 Kudos

Bind the "firstVisibleRow" property to a context attribute (integer) and set the attribute value after sorting to the row index that should appear as first visible row.

Armin

nikhil_bose
Active Contributor
0 Kudos

upon setting lead selection it should work. Are you sure that you are calling setLeadSelection() for the intended node only? And is called onSort event after sorting object is fired?

nikhil