cancel
Showing results for 
Search instead for 
Did you mean: 

Table rows

Former Member
0 Kudos

Hi,

I have some queries which i want to ask before making a sample application asked my senior.Please reply in detail as i am new to this technology.

1. How to get the details of a lead selected row of table?

2. How to change the visible rows of a table dynamically?

3. How to change the layout manager?

thanks in advance,

ankur

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ankur,

following are the answers to your queries:

1. How to get the details of a lead selected row of table?

A table is binded to a node say TableDetails

use the following code to fetch lead selection

int leadSelection=wdContext.nodeTableDetails.getLeadSelection();

ITableDetailsElement objTableDetailsElement=wdContext.nodeTableDetails().getTableDetailsElementAt(leadSelection);

to fetch column details of lead selction

objTableDetailsElement.getcol1Attr();

objTableDetailsElement.getcol2Attr();

2. How to change the visible rows of a table dynamically? Step1 Create a context of integer type say visibleRow.

Step 2: Bind it to visiblerow property of your table

Sep 3: Set this attribute to any integer value in your code like:

wdContext.currentContextElement.setVisibleRow(10);

or there is one more way to do so which is given below:

inside wdModifyView()

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

table.setVisibleRowCount( 10);

// will set visible row value

3. How to change the layout manager?

In the outline you will find the property called Layout there you can change to the required Layout(Matrix, Grid,Flow & Row Layout).

thanks,

amit bagati

Edited by: Amit Bagati on May 1, 2008 9:56 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks everyone for your useful replies.

regards,

Ankur

snehal_kendre
Active Contributor
0 Kudos

HI Ankur,

Check properties tab of a table carefully. As most of the settings are there only.. such as

to get lead selection.

1. in your OnLeadselect method of you table you can do as

wdContext.nodeAssignedtoTable().getLeadSelection();

2. How to change the visible rows of a table dynamically?

If you just want to set visiblity of rows then.

1. there is visible property of row assign it a context of type visibilty and in your coding you can set it to none, visible, invisible.

If you want to create dynamically rows

then refer

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/74cda090-0201-0010-6b91-f85b2489....

it is really usefull.

3. How to change the layout manager?

There is no special layout for table. Table inherite layout of group/container in which you added it as a child

nikhil_bose
Active Contributor
0 Kudos

1. How to get the details of a lead selected row of table?

You can get the Lead Selected Row values by referring the current context.

e.g:

wdContext.currentTableNodeElement().getFirstColumn(); where FirstColumn is your first table column will get you the lead selected value.

2. How to change the visible rows of a table dynamically?

you can create a value attribute of type integer and assign to VisibleRowCount property of Table UI element. At runtime you can change the values.

3. How to change the layout manager?

Select any container and set the Layout as GridLayout or matrix layout which will help you to design the UI Element according to your wish.

Additional:

All Layout will arrange in tabular form so you can put invisible elements where it needed and use Transparent containers wherever it needs.

nikhiL