cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal scroll in webdynpro java table

former_member200477
Participant
0 Kudos

Hello,

I have a webdynpro java application in which i have a table with 15 columns. I have set the scrollableColCount property of the table to 5.

Now on click of some link(LinkToAction), i want to scroll horizontally to column 8. Can i do this from the program?

Please help me with the code.

Thank you,

Navya

Accepted Solutions (1)

Accepted Solutions (1)

govardan_raj
Contributor
0 Kudos

Dear navya,

 

IWDTable table = (IWDTable)view.getElement("TableName");

table.setFirstVisibleScrollableCol("columID");

here table name is your tablename , and columnID is your 8th Coulmn name

what you can do is create an attribute of type IWDTable in context , and set your table id to it in view

wdDoModifyView() method

if(firstTime)

{

 

wdContext.current**********Element().set******TablelID((IWDTable)view.getElement("TableName"));

}

onActionLink() // which is binded to your linktoAction UI Element

{

  wdContext.current**********Element().get******TablelID.setFirstVisibleScrollableCol("columID");

}

Regards

Govardan

former_member200477
Participant
0 Kudos

Hi Govardan,

This works exactly the way i wanted it

Thank you

junwu
Active Contributor
0 Kudos

but it is a wrong approach.....very bad practice.

you just have to bind FirstVisibleScrollableCol to an attribute, then manipulate the attribute

govardan_raj
Contributor
0 Kudos

most welcoem navya Cheers 🙂

Regards

Govardan

Answers (0)