You need to sign in to do that
Don't have an account?

How to add and remove rows dynamically in visualforce page
Hi all,
I have a requirement that i have to display 3 objects like contact,user and lead. According to the object selection it should display all fields of the corresponding object in dropdown list,also operators in dropdown and search value in input text box in a single row.
When i select add row button it should add one more row with corresponding object fields,operators and search text box and when i click remove row button it should remove rows.How can i approach this.?.
Thanks in advance,
Deepak
I have a requirement that i have to display 3 objects like contact,user and lead. According to the object selection it should display all fields of the corresponding object in dropdown list,also operators in dropdown and search value in input text box in a single row.
When i select add row button it should add one more row with corresponding object fields,operators and search text box and when i click remove row button it should remove rows.How can i approach this.?.
Thanks in advance,
Deepak
Here is a blog you can refer.
For adding a row you need to follow these steps
Let me explain it for contact.
Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
I am also having the same issue . I posted my code below
My code:
public void addrow()
{
rowlist = new List<Sobject>();
totalRecords=0;
sno = value.size();
system.debug('@@@@@@@@@@@@@'+sno);
for(Sobject s:val4)
{
wrapperclass wr = new wrapperclass('s.Email','s.Name',false,s.id,sno);
value.add(wr);
}
system.debug('$$$$$$$$$$$$$$$'+value);
}
Thanks.
For example, if i select user object in dropdown. in filter condition it should display those user fields,operators and search box.When i click add row button it should add one more row with user fields,operators and search box in another row.
Thanks.