function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ashritha ReddyAshritha Reddy 

Hai friends

Can Any One explain in which situation we have to use Wrapperclass ?
Dear Ashritha,

A wrapper or container class is a class, a data structure, or an abstract data type which contains different objects or collection of objects as its members.

Please look into following link for example.

Hope it helps you.

Anjith kumar.

Just an Analogy - Say you have number of rows displaying on a VF page. And each row needs to have a delete link , which when clicked deletes the record from database as well. So you need to bind the rows with index. So this has to be done with Wrapper class , where you check for the index of delete link .

Similarly , each row has a checkbox. And you want to fetch all the rows that user checked and update all at once. This also wil need a wrapper.