Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

ASPxGridView - How to calculate column values on the client side via editors inside DataItemTemplate

$
0
0

This example demonstrates how to calculate column values on the client side via editors inside DataItemTemplate and submit the changes to a datasource.

1) Define ASPxSpinEdit editors inside the "Unit Price" and "Units In Stock" column DataItemTemplate and bind the editors with corresponding column values;
2) Define both an unbound column and ASPxTextBox editors inside its DataItemTemplate to display the results of the calculation;
3) Handle the ASPxGridView.CustomUnboundColumnData event to populate unbound column values;
4) Handle the client-side NumberChanged event of template ASPxSpinEdit and calculate a resultant total value for a corresponding DataRow;
5) Track all the modifications via the ASPxHiddenField control;
6) Perform a postback to the server and submit all the changes to the datasource: retrieve the changes from the ASPxHiddenField control.

See Also:
E2961: How to sum values of bound and unbound columns and calculate a total value on the client side


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>