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
Ravi NarayananRavi Narayanan 

Displaying Total of two columns in HTML Table Dynamically

Hi Guys,

              <td>  <apex:inputfield value="{!variantAlist[0].arq_QuantityofMonth6__c}"/>   </td>
           <td>     <apex:inputfield value="{!variantBlist[0].arq_QuantityofMonth6__c}"/> </td >

now i want another column where i want to display the total of these two records. 

so i created one list in my controller and calculated sum  using totalist[0]=variantAlist[0].arq_QuantityofMonth6__c+variantblist[0].arq_QuantityofMonth6__c

So finaly my code is liek this

<td>  <apex:inputfield value="{!variantAlist[0].arq_QuantityofMonth6__c}"/>   </td>
           <td>     <apex:inputfield value="{!variantBlist[0].arq_QuantityofMonth6__c}"/> </td >
<td> <apex:outputtext value= "{!totallist[0]}"  </td> 

Everything is woking fine. 

 

But now whenever the user changes the value manually in the table,  immediately this totallist should be modified accordingly.. 

 

i thought of using onchange event in inputfield and call actionfunction and rerender. but it doesn seem to work as i already have apex:inputfile in my page and it doesn allow me to go for action tags.

 

can someone pplease help me out on this? its very urgent and i need to fix it 

 

Bala_BforceBala_Bforce
What about action support?? or try Javascript
Ramu_SFDCRamu_SFDC
As far as my knowledge goes, you definately need to have apex action function tag to call the controller method when there is a change in the input fields. Or a javascript function with a javascript on change event on component should work.
Ravi NarayananRavi Narayanan
Hi Guys,

I moved the apex:inputfile to another form and now i am able to rerender the table using action function. but rerender takes more time.. is there any way by which we can just rerender the row that was changed...  i mean ONCHANGE of Inputfield and rerender only that particualr row.