Format Data Display
Dynamically Update Sum on Table Without Postback

Code Customization
Dynamically Update Sum on Table Without Postback
Description:

This customization dynamically updates the sum of a numeric field (e.g. , int, float) in an editable table panel. Make sure this field is not set up to be displayed with a custom format (e.g. this customization will not work for a field UnitPrice which is configured to be displayed as $1234.56).

This customization will not work properly if the SmoothPanelUpdate pass-through attribute is True for the editable table panel. For the customization to work properly, set the SmoothPanelUpdate pass-through attribute to "False".

This customization will be added in:

..\<Application Name>\App_Code\<Table Name>\Edit<Table Name>Table.Controls.cs

For example: C:\MyApp1\App_Code\Orders\EditOrdersTable.Controls.cs

Procedure:

Step 1:  In Iron Speed Designer, select an Editable Table page (e.g. EditOrdersTable.aspx) from the Application Explorer.

Step 2:  Switch to Design Mode then select the Table control.

Step 3:  Add the follow lines of code into any desired empty cell.

<!-- BEGIN dynamic sum -->
	<td class="table_cell" colspan="4">
		<div class="field_label">Sum</div>
	</td>
	<td class="table_cell" colspan="100">
		<input type="text" id="SumTextbox" class= "field_input" READONLY/>
   	</td>
<!-- END dynamic sum -->
    			

Step 4:  Display the Properties dialog and go to the Attributes tab. Set the attributes of the numeric FieldValue control being summed as follows.

        Attribute Name: OnBlur
        Attribute Value: javascript:RefreshSum();
  				

Step 5:  Go to the Control Type tab and set the Display style of the numeric FieldValue control to Text Box.

Step 6:  Use this wizard to add code customization.

Step 7:  Build and run the application.

Applies To:

This customization only applies to an editable table panel.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.


  Privacy Statement