cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the previous row selected index of a table....

Former Member
0 Kudos

Hi friends,

I have a table. i have a action/event handler defined on its onLeadSelect event.

In this event, if i use node_code->get_lead_selection_index( ) .. i m getting the newly clicked row index.

ex: table has 3 rows.

Row 1 is by default selected. Now if i select the row 3, in my event by using node_code->get_lead_selection_index( ). im getting index 3. which i sel

But i want to get index 1.

kindly help me.. i dont have any other option as i m very new to this.

hope i gave u correct inputs on my problem.

thanks in advance,

Niraja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

One way to achieve this is to maintain an attribute in the assistance class or a node element , called OldLeadSelection , at the Component controller level which stores the value of the lead selection index.

On LeadSelect action handler method, in the first line, read the value of the attribute/element defined above. For the first time a row is lead selected, this value will be initial. After exexcuting the code in the LeadSelection event handler method, store the LeadSelection index value in the attribute defined above. The next time when the LeadSelection event method is called, when the value of this attribute is read in the initial line, it will house the value of the index of the previous LeadSelection.

There could be other ways to achieve this. This is one of the methods.

Best Regards,

Rashmi.

Answers (0)