Vote count:
0
HTML:
<table>
<tr>
<th><b>ADD</b></th>
<tr><td class = "tdCustom" ><apex:commandButton value="Add" action="{!addBatch}" id="update" </td></tr>
<td class = "tdCustom" style="width:100px;">
<apex:repeat value="{!batchMap[qliRow]}" var="child" id="therepeat2">
<table class="table-data" border = "1">
<apex:variable value="{!1}" var="batchrowNum"/>
<tr id="tr_clone">
<td> <apex:input value="0" id="counter"/></td>
<td>
<apex:commandButton value="Delete" action="{!deleteBatch}" />
</td></tr>
<apex:variable var="batchrowNum" value="{!batchrowNum+ 1}"/>
</table>
</apex:repeat>
</td>
</tr>
<apex:variable var="rowNum" value="{!rowNum + 1}"/>
</apex:repeat>
</apex:repeat>
</table>
Sample script:i tried
<script>
var val;
$("#update").click(function()
{
val = $('#counter').val();
val++;
$('#counter').prop('value',val )
});
</script>
I have one table "main table" and "sub table"(table inside maintable) while clicking on action="{!addBatch}"
it is adding row on sub table.
If i have three items in main table i can see three add buttons .whatever add button i clicked it has to increment one number in <apex:input value="0" id="counter"/>
In the same when i deleting some child row in middle it has to rearrange number <apex:input value="0" id="counter"/>
asked 2 mins ago
Click on Add auto number incerment 1,2,3-----
Aucun commentaire:
Enregistrer un commentaire