+ Start a Discussion
Gaurav Gupta 91Gaurav Gupta 91 

Hi I want to to display a click me link in a coulmn of table and on click of the link information specific to row showld display below the table

Hi I want to to display a click me link in a coulmn of table and on click of the link information specific to(service number) should display below the table, how to achieve it in lightning.

User-added imageUser-added image
 
AshlekhAshlekh
Hi,

I can give you some idea here look below code to understand the idea.
 
<compoent_first>
  <attribute recordid=""/>
  <attribute view=""/>
  <eventhanlder methodcall="methodname"/>
     <if isTrue="{!v.view=='List'}">
            <Compoent_Second> <This compoent have the list of record, when user click on this 
       <set attribute="false">
           <Compoent_Third recordid="{!v.recordid}">
     ​</if>
</compoent_first>

Compoent_Second : This comopoent have the list of recrods and when user click on the record, call a method of client controller and call a event method with parameter of recrod id and view=nolist.

Compoent_Third : This compoent will have the detail of record and have one attribue by which this will know which record need to show(recordid).

Event : Compoent second call a event which is handle by Componen_first and call a method to set the value of recordId and view attribue and this values are present in event param.

-Thanks
Ashlekh Gera