Use <apex:variable > component in vf page place this inside a table,
Ex : <apex:variable value="Cnt" var="c"/> <apex:datatble-----------------/> <apex:column/> <apex:variable value="{!cnt+1}" var="c1"/> //increments cnt value for Every record by one </apex:datatable> <apex:outputlabel value="{!c1}">
1) OnSelect call controller method and pass the selected object. 2) Use Count Query and store the count in variable. 3) bind this variable with Visualforce page
You can simply do aggregate queriy adn count you can display...
Select Count(Id) from Account(Selected Object)
Thanks
Sandeep
Use <apex:variable > component in vf page place this inside a table,
Ex :
<apex:variable value="Cnt" var="c"/>
<apex:datatble-----------------/>
<apex:column/>
<apex:variable value="{!cnt+1}" var="c1"/> //increments cnt value for Every record by one
</apex:datatable>
<apex:outputlabel value="{!c1}">
2) Use Count Query and store the count in variable.
3) bind this variable with Visualforce page