You need to sign in to do that
Don't have an account?
❤Code
copy values from one column to another in pageblocktable dynamically
Hi All,
I have a vf page where i am adding rows dynamically. Once i add rows i need to copy the values from previous rows to current row. Is there a way to do it via javasscript. How to get the rowindex .
Regards
I have a vf page where i am adding rows dynamically. Once i add rows i need to copy the values from previous rows to current row. Is there a way to do it via javasscript. How to get the rowindex .
<apex:pageBlockSection title="Child RFP Details" collapsible="false" id="section"> <apex:pageBlockTable id="thetable" var="acc" value="{!attendeeList1}" onRowMouseOver="removeHighlight(this)"> <apex:column headerValue="Action" > <apex:commandLink value="Copy" reRender="pb" onclick="testMe(event)"/> </apex:column> <apex:column headerValue="Custom Package"> <apex:param name="rowIndex" value="{!rowNumber}"/> <apex:selectList multiselect="true" value="{!acc.discountSchedule}" styleClass="fullWidth chzn-select" size="1" style="width:400px;" > <apex:actionSupport event="onchange" action="{!acc.updateMarketOptions}" rerender="geographies" oncomplete="renderChosen()"/> <apex:selectOptions value="{!Dept}"/> </apex:selectList> <apex:variable var="rowNumber" value="{!rowNumber+1}"/> </apex:column> <apex:column headerValue="Market" id="market"> <apex:outputPanel id="geographies" layout="block" > <apex:selectList id="selectedmarkets" multiselect="false" value="{!acc.discountSchedule1}" styleClass="fullWidth chzn-select" size="1" style="width:150px" > <apex:selectOptions value="{!acc.marketOptions}"/> </apex:selectList> </apex:outputPanel> </apex:column> <apex:column headerValue="State" > <apex:inputField value="{!acc.cp.State__c}" styleClass="twitterStyleTextbox"/> </apex:column> <apex:column headerValue="First Issue" > <apex:inputField value="{!acc.cp.First_Issue__c}" styleClass="twitterStyleTextbox"/> </apex:column> <apex:column headerValue="Last Issue" > <apex:inputField value="{!acc.cp.Last_Issue__c}" styleClass="twitterStyleTextbox"/> </apex:column> <apex:column headerValue="Circulation" > <apex:inputField value="{!acc.cp.Circulation__c}" styleClass="twitterStyleTextbox"/> </apex:column> <apex:column headerValue="Space Unit"> <apex:inputField value="{!acc.cp.Space_Unit__c }" styleClass="chzn-select"/> </apex:column> <apex:column headerValue="Space Discount"> <apex:inputField value="{!acc.cp.Space_Discount__c}" styleClass="twitterStyleTextbox"/> </apex:column> <apex:column headerValue="Per Unit Open Rate"> <apex:inputField value="{!acc.cp.Per_Unit_Open_Rate__c}" styleClass="twitterStyleTextbox"/> </apex:column> <!-- <apex:column headerValue="Action"> <apex:commandLink value="Delete" reRender="pb" oncomplete="renderChosen()" action="{!deleteLanguage}" /> </apex:column> --> <apex:column width="25px" headerValue="Remove"> <apex:inputCheckbox value="{!acc.checked}"> <apex:actionSupport event="onchange" action="{!deleteLanguage}" rerender="pb" oncomplete="renderChosen()"/> </apex:inputCheckbox> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <apex:commandButton action="{!addRow}" value="Add Row" reRender="pb" oncomplete="renderChosen()"> <apex:param name="rowIndex" value="{!rowNumber}"/> </apex:commandButton> </apex:pageblock>
Regards
Which method is having copy functionality from one row to another.
Regards.