cancel
Showing results for 
Search instead for 
Did you mean: 

Read table row id

Former Member
0 Kudos

HI

I have a table with multiselect option. Suppose I had selected 3 rows of that table. How can I get the row numbers or row id of the selected rows.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

First of all getting row id of any table you have to need acess the table.you can acess table or any UI in webdypro in wdDoModifyView() method.

the code for this is:

if(firstTime){

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

table.mappingOfOnLeadSelect().addSourceMapping("row","rowid");

where "producttable" is the id of table.

Now you have send this rowid as a parameter in any custom method and get this rowid from this method.

thanks,

Dibyendu.

Former Member
0 Kudos

hai vidyadar,

run a loop with the tables node size and get the values you need.

Thanks n Regards

Sharanya.R

Former Member
0 Kudos

Hi

Can getselection or getLeadselection give me the results?

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Vidyadhar,

Getting selected row

int leadSelect = wdContext.nodeTable().getLeadSelection();

Getting selected row field value.

String selectedAction = null;

selectedAction = wdContext.nodeTable().getTableElementAt(leadSelect).getAction();

Regards, Suresh KB

Former Member
0 Kudos

Hi,

Lets say your node name is orders and if you want to check the multiselected items you can use the following code.


for(int x=0; x<wdContext.nodeOrders().size(); x++)
	  {
		  if(wdContext.nodeOrders().isMultiSelected(x))
		  {
			  wdComponentAPI.getMessageManager().reportSuccess(String.valueOf(x) + " Is Selected");
		  }
	  }

If its single selection then you dont have to iterate you can get the selected one from the leadSelect event

Regards

Ayyapparaj