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
Jayaram Bevara 3Jayaram Bevara 3 

add subrow for existing row in pageblock table like 1.1,1.2....... for 1 and 2.1...... for 2 etc

GauravGargGauravGarg
Hi Jayaram,

take a look to this article, showing dynamic add of row on runtime: 
https://salesforce.stackexchange.com/questions/75434/nested-tables-how-can-i-add-a-child-row-dynamically

Thanks,
Gaurav
mohdAnasmohdAnas
<apex:pageBlock mode="edit">
<apex:pageblocksection title="Order Lines" showheader="true" collapsible="true" columns="1">

    <apex:pageBlockTable value="{!accounts}" var="a">
        <apex:column value="{!a.Name}"/>

        <apex:column breakBefore="true" colspan="2">
            <apex:outputPanel>
                <ul>
                    <apex:repeat value="{!a.contacts}" var="c">
                        <li>{!c.Id}</li>
                        <li>{!c.Name}</li>
                    </apex:repeat>
                </ul>
             </apex:outputPanel>
        </apex:column>
    </apex:pageBlockTable>
</apex:pageblockSection>
</apex:pageBlock>

User-added image
<apex:pageBlock mode="edit">
<apex:pageblocksection title="Order Lines" showheader="true" collapsible="true" columns="1">

    <apex:pageBlockTable value="{!accounts}" var="a">
        <apex:column value="{!a.Name}"/>

        <apex:column colspan="2">
            <apex:outputPanel>
                <ul>
                    <apex:repeat value="{!a.contacts}" var="c">
                        <li>{!c.Id}</li>
                        <li>{!c.Name}</li>
                    </apex:repeat>
                </ul>
             </apex:outputPanel>
        </apex:column>
    </apex:pageBlockTable>
</apex:pageblockSection>
</apex:pageBlock>


User-added image
Hi Jayaram,
I have used <ul>;if you want 1.1, 1.2, 1.3,etc. try using it with <ol> tag.

good day!

Jayaram Bevara 3Jayaram Bevara 3
Thank you GauravGarg, I already refered that one it won't help me. 
My requirment was while clicking addrow it need to add new row like 1 and 2 etc.......
i had another button for each row like add sub row, while clicking that one it need to add 1.1 for 1 
please help me with any suggesion.