Hello,
I would like to try using the CompositeScript functionality provided by the RadScriptManager. However, I'm having difficulty trying to pass in the parameters that I would need in the javascript in order to do to. For example, for the RadNumericTextBox OnValueChaging event, we defined the javascript function to call:
txtAmount.ClientEvents.OnValueChanging = "price_changing";
In the RadScriptBlock, I have the following function:
function price_changing(sender, args) { var strOldValue = args.get_oldValue().toString().replace("$",""); // 0.00 var strNewValue = args.get_newValue().toString().replace("$", ""); // 0.00 var totalfee = parseFloat(document.getElementById("<%= lblTotalFee.ClientID %>").innerText.replace("$", "")); if (run_update && (strOldValue != strNewValue)) { var grid = $find('<%= grdFee.ClientID %>'); .....
In order to move the script block into a seperate .JS file, I need to replace "<%= lblTotalFee.ClientID %>" with a variable I can pass into the javascript function. (Or the "<%= grdFee.ClientID %>").
There seems to be no way of doing that, I cannot specify parameters in the ClientEvents.OnValueChanging event.
One way might solve it is to upgrade to .NET 4 (We use .NET 3.5 now), then use the ClientIDMode property, so we can always expect a static ID. But I'm looking for another option.
Any ideas?
Thanks,
Annie
<telerik:RadScriptManager ID="RSM" runat="server"></telerik:RadScriptManager> <table> <tr> <td valign="top"> <telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" Width="400px"> <Configuration ViewPaths="~/Images/CMS" DeletePaths="~/Images/CMS" UploadPaths="~/Images/CMS" /> </telerik:RadFileExplorer> </td> <td valign="top"> <telerik:RadEditor Height="700px" Width="100%" ID="RadEditor1" Content='<%# Bind("PageContent") %>' Runat="server"> <ImageManager DeletePaths="~/Images/CMS" UploadPaths="~/Images/CMS" ViewPaths="~/Images/CMS" /> </telerik:RadEditor><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="cboContentAreas"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="cboAreasOfConcern" /> <telerik:AjaxUpdatedControl ControlID="cboInterventionTools" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="cboAreasOfConcern"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="cboInterventionTools" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Grid.aspx.cs" Inherits="TelerikTest.Grid" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="scriptManager" runat="server"></telerik:RadScriptManager> <telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="ajaxLoadingPanel" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="divGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="divGrid" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="divNonGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="divNonGrid" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" Skin="" Transparency="20" > <div id="Div1" style="background-color: #F0F0F0; height:100%; width:100%;" runat="server"></div> </telerik:RadAjaxLoadingPanel> <div> <div id="divNonGrid" runat="server"> <asp:Button ID="btnNonGrid" runat="server" Text="non-grid" /> </div> <div id="divGrid" runat="server"> <asp:Button ID="btnGrid" runat="server" Text="grid" /> <telerik:RadGrid ID="RadGrid1" runat="server"> <MasterTableView> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridClientSelectColumn UniqueName="column"> </telerik:GridClientSelectColumn> <telerik:GridBoundColumn UniqueName="ID" DataField="ID" > </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="column1"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="column2"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True" /> </ClientSettings> </telerik:RadGrid> </div> </div> </form> </body> </html> 1. series.PlotArea.Appearance.Dimensions.Margins.Left to align the charts vertically but could not get desired result.
2. series.PlotArea.Appearance.Dimensions.Width to set the width of plot area so that all charts are displayed with same width but could not get desired result.
I have tried same above mentioned setting with radcahrt.PlotArea but no effect.
Can anyone please help me resolving these issues at the earliest.
Thanks in advance...
Krishna Samaga B.