
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function setTotal() { var radCostF = 0; var radPercentF = 0; var radTotal; var radLength = document.getElementsByTagName("INPUT"); var strToFind = "TEMPCOST"; for (i = 0; i < radLength.length; i++) { var element = radLength[i]; strToFind = "TEMPCOST"; if (element.id.indexOf(strToFind) >= 0) { if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) { alert(element.id + "=" + element.value); radCostF = element.value; } } strToFind = "TEMPPCT"; if (element.id.indexOf(strToFind) >= 0) { if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) { alert(element.id + "=" + element.value); radPercentF = element.value; } } strToFind = "TOTAL"; if (element.id.indexOf(strToFind) >= 0) { if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) { element.value = radCostF * radPercentF / 100; } } } } </script> </telerik:RadCodeBlock>
<td>
Total:
<br />
<telerik:RadNumericTextBox NumberFormat-DecimalDigits="2" ID="TEMPCOST" runat="server"
Value= '<%#CheckNumericNull(DataBinder.Eval(Container, "DataItem.TEMPCOST"))%>' >
<ClientEvents OnBlur="setTotal" />
</telerik:RadNumericTextBox>
</td>
<
td>
Total:
<br />
<telerik:RadNumericTextBox NumberFormat-DecimalDigits="2" type="Currency" ID="TOTAL" runat="server"
ReadOnly="true" Value="0.00" />
</td>
The event OnBlur fires and I can read the values from the source controls and set the value of the target (TOTAL) but the value is not reflected to the user. In other words if I set the value of TempCost to 100 and Percent to 10 then when I pass through the same code again, the value of the TOTAL field is 10 but screen still shows 0 even after the event has fired. Any thoughts as to why the screen is not displaying the updated value?
Hello.
I'm using a RadSplitter control with a RadTreeView in the left pane and a detail ASP:Panel on the right pane.
All is working fine except the speed of the right panel update. Updating the controls in the as:panel container is very slow when the tree contains many nodes and it's fast when the tree contains a few nodes. The update is triggered when the user clicks on a node.
In the Ajax Manager i'm updating the asp:panel PanelTreeItems only and not the left pane that contains the tree (PanelMain). Does it mean that the tree is also updated?
Here is the ASP code
... <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyFilters" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadTreeView"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="PanelTreeItems" LoadingPanelID="RadAjaxLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <telerik:RadWindowManager ID="RadWindowManager" runat="server" Skin="Outlook"> </telerik:RadWindowManager> ... <asp:Content ID="ContentMain" ContentPlaceHolderID="ContentPlaceHolder" runat="Server"> <asp:Panel ID="PanelMain" runat="server" Visible="true"> <table> ... <telerik:RadSplitter ID="RadSplitter" runat="server" Height="100%" Width="100%" Visible="false" ResizeMode="EndPane" Skin="Office2007"> <telerik:RadPane ID="Radpane1" runat="server" Width="350" Scrolling="Y" MinWidth="22"> <table id="MainTable" style="z-index: 102;" cellspacing="0" cellpadding="0" border="0"> <tr> <telerik:RadTreeView ID="RadTreeView" runat="server" CheckBoxes="false" Height="90%"> </telerik:RadTreeView> </tr> </table> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward"></telerik:RadSplitBar> <telerik:RadPane ID="Radpane2" runat="server" Scrolling="None" MinWidth="22"> <asp:Panel ID="PanelTreeItems" runat="server" Visible="true"> ... </asp:Panel> </telerik:RadPane> </telerik:RadSplitter> </table> </asp:Panel> </asp:Content>