+ Start a Discussion
Baktash H.Baktash H. 

Functions in datatables


I have a little Problem:


I have a user page where it shows a number in a VF force page. The apex code is like this:

 List<Obj__c> values = [SELECT Name FROM Obj__c WHERE RelatedObj__r.Id =: variable.Id];
number = values.size();


This works. Now comes the Problem. I want a datatable with all users, and in one column should be the number.


How is it possible, that i get the listsize of every record in that coloumn? With the single one it is easy, because i know the Id ( variable.Id )of the record, but in a datatable I dont.

Rahul SharmaRahul Sharma

This can be done by using wrapper class.

Here is an example of Wrapper class