function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hai,
iam new to development.. Help me
How to Dispaly All Account Names Row Wise on VF Page(per row only 5 Names)
Thanks in Advance.
Nani.
Hi,
Try the below code snippet as reference:
------------ apex class --------------
public class test_cls
{
public List<string> finalacc{set;get;}
public test_cls()
finalacc=new List<String>();
List <Account> acc =[select id,name from account];
integer count=0;
for(integer i=0;i<acc.size();i++)
if(MAth.Mod(count,5)==0 && count!=0)
string accname=acc[i].name +'<br/>';
finalacc.add(accname);
}
else
finalacc.add(acc[i].name);
count++;
-------- vf page --------------
<apex:page controller="test_cls" >
<apex:form >
<apex:outputText escape="false" value="{!finalacc}">
</apex:outputText>
</apex:form>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks Navatar for ur reply
Hi,
Try the below code snippet as reference:
------------ apex class --------------
public class test_cls
{
public List<string> finalacc{set;get;}
public test_cls()
{
finalacc=new List<String>();
List <Account> acc =[select id,name from account];
integer count=0;
for(integer i=0;i<acc.size();i++)
{
if(MAth.Mod(count,5)==0 && count!=0)
{
string accname=acc[i].name +'<br/>';
finalacc.add(accname);
}
else
{
finalacc.add(acc[i].name);
}
count++;
}
}
}
-------- vf page --------------
<apex:page controller="test_cls" >
<apex:form >
<apex:outputText escape="false" value="{!finalacc}">
</apex:outputText>
</apex:form>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks Navatar for ur reply