cancel
Showing results for 
Search instead for 
Did you mean: 

Column Position

Former Member
0 Kudos

Hi All,

How is it possible to know the table column at runtime.I would require this since I am using Abstract Variants for creating table cells and each product represents a

table column and rows represents product properties.I would require to know the

table column in the onLeadSelect Method.Is there a parameter I can source map on lead select which would facilitate this.

Regards

Amit

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Amit,

If you want to get the columns at run time try this method,

->First create a reference(object) for the table.

->using that referrence you can access all the properties of the table.

-> use getColumn(int index) or getColumns() methods as per your requirement.

I have given a sample code below, I hope it will be helpfull for you.

<b>IWDTable tabl = (IWDTable)view.getElement("ProductTable");

IWDTableColumn col = tabl.getColumn(wdContext.nodePerson().getLeadSelection());</b>

If you have any more clarifications, please post it here, I will reply you.

regards,

Prabhu.

Former Member
0 Kudos

This will give you the column at the index given by the lead selection of the data source node (which is completely useless

Armin

Former Member
0 Kudos

Hi Armin,

By mistake I have placed the Lead Selection over there, pardon me, I am just a beginner.

Will it retrun the required column of current element, if we place the required column index there?

i.e. IWDTableColumn col = tabl.getColumn(<int index>);

Former Member
0 Kudos

Thankyou guys this problem is resolved now.

Former Member
0 Kudos

hi Amit..

Check the below link.... you might get some useful points... If it helps means rewards some points....

http://help.sap.com/saphelp_nw04s/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/frameset.htm

Former Member
0 Kudos

Hi ,

This what I tried to do but it does'nt work.

Regards

Amit

Former Member
0 Kudos

Hi ,

onLeadSelect would give you the col under the variable "col".

Create source mapping for this event.. and get the parameter in the event handler.

table.mappingOfOnLeadSelect().addSourceMapping("col","attribute name in the event handler argument");

Regards

Bharathwaj

Message was edited by:

Bharathwaj