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
Rakesh KumarRakesh Kumar 

How to add dynamic Table's TD tag in to table using Visualforce?

Hi All,

 

My requirement is to add dynamic table TD tag in to visualforce. Is it possible to add in to tabl?

Presently i am iterating <apex:repeat > tag and displaying td values. but my table structure is getting distort when records are less than table td.

 

 

Code..

        <apex:repeat value="{!records}" var="psl">

          <tr class="tdata">

                <td>{!psl.name}</td>
                <apex:repeat value="{!psl.Patient_Survey_Trends__r}" var="trends"> 
                     <td width="60">{!trends.Remedy_RCC_nov__c}          </td>
                     <td width="50">{!trends.Dose_1_nov__c}          </td>
                     <td width="70">{!trends.Admin_Start_Date_nov__c}          </td>
                     <td width="50">{!trends.Treatment_Term_RCC_nov__c}          </td>
                </apex:repeat> 

      <tr>

</apex:repeat> 

 

My requierment

 


                <td width="60">Remedy 1         </td>
                <td width="50">Dose 1     </td>
                <td width="70">period  1      </td>
                <td width="50">effectiness1          </td>
                <td width="60">Remedy 2         </td>
                <td width="50">Dose 2     </td>
                <td width="70">period 2       </td>
                <td width="50">effectiness2          </td>
                <td width="60">Remedy 3         </td>
                <td width="50">Dose 3      </td>
                <td width="70">period  3    </td>
                <td width="50">effectiness 3         </td>
                <td width="60">Remedy  4        </td>
                <td width="50">Dose 4      </td>
                <td width="70">period  4      </td>
                <td width="50">effectiness 4         </td>
                 <td width="60">Remedy5          </td>
                <td width="50">Dose 5      </td>
                <td width="70">period 5       </td>
                <td width="50">effectiness5          </td>
                 <td width="60">Remedy  6        </td>
                <td width="50">Dose   6    </td>
                <td width="70">period    6    </td>
                <td width="50">effectiness 6         </td>

 

during iteration i am getting only green formated td value because rest of records are not available in db.

but i would like to iterate all table td even if value is less than actual design table.

 

Is there any idea to iterate it?

 

Please share it.

 

Thanks

Rakesh