+ Start a Discussion

how to get row field values into controller when row is clicked?

hai friends
when i click on a row in visual force page i want to get these field values into controller please any one guide me urgent
<apex:page standardController="Lead" recordSetVar="leads" tabstyle="lead" sidebar="false" extensions="leadclickgenaccount">
   <apex:pageBlock >
    <apex:pageBlockTable value="{!leads}" var="ld"  onRowClick="fun();">
      <apex:column value="{!ld.name}"/>
      <apex:column value="{!ld.phone}"/>
      <apex:column value="{!ld.email}"/>
You should use <apex:param> tag inside <apex:actionSupport> and pass the id as param to controller.!!
i want field values not id,when ever i click on particular row that row field values i have to get into controller.by taking those values i have to insert account
Ok so u need to create a setter method in controller something and set the values to a variable in controller ,something like below :-

VF page 

<apex:column value="{!lstr}"/> // This sets the values to String str in controller

Apex class

public String str{get;set;}

no not this ,bye using above code it will display lead records in visual force page,in vf page click on row when that row values i have to take into controller
Ohk  !! Use a wrapper class and store the value in a variable :-

go through the below links to learn more :-




Hope this helps !!

If this helps,please mark this as best answer to help others :)