You have two options for achieving this requirement in the context of the edit item:
1) Handle the server-side OnItemDataBound
event of the grid, get reference to the edit form item and the TextBox
controls and calculate the sum on server-side. Detailed information for getting reference to controls on server-side could be found in the following help article:
2) The second approach would be to handle the client-side pageLoad event, get reference to the edit form item, find the elements generated for the TextBox controls and perform the calculation. For getting reference to standard controls (like TextBox, Label, etc.
) you can use the $telerik.findElement(container, controlID)
method, where the container in your scenario will be the form template. If you are using a control from our suite (a RadNumericTextBox for example
) you will have to use $telerik.findControl(container, controlID)
method instead and use the methods from the client-side API for retrieving and settings the values.
Hope this helps.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items