or
| function progressStarted(radProgressManager) { |
| var container = document.getElementById('usrAddBatch_RadWindow1_C_RadProgressArea1_Panel'); |
| var new_element = document.createElement('h2'); |
| new_element.innerHTML = 'Creating Renewals'; |
| new_element.setAttribute("class", "clsLoadHeader"); //For Most Browsers |
| new_element.setAttribute("className", "clsLoadHeader"); //For IE; harmless to other browsers. |
| if (container) |
| { |
| container.insertBefore(new_element, container.firstChild); |
| } |
| //Disable the tabs while we are processing renewals |
| var tabStrip = $find("Radtabstrip1"); |
| if (tabStrip) |
| { |
| for (x = 0; x < tabStrip.get_tabs().get_count(); x++) |
| { |
| tabStrip.get_tabs().getTab(x).set_enabled(false); |
| } |
| } |
| // Show the rad window |
| var radWindow = $find("usrAddBatch_RadWindow1"); |
| if (radWindow) { |
| radWindow.show(); |
| radWindow.center(); |
| radWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.None); |
| radWindow.set_visibleStatusbar(false); |
| radWindow.set_visibleTitlebar(false); |
| radWindow.set_modal(true); |
| } |
| } |
| <telerik:RadWindow ID="RadWindow1" |
| EnableEmbeddedSkins="false" |
| runat="server" |
| VisibleOnPageLoad="false" |
| Width="448" |
| Height="208"> |
| <ContentTemplate> |
| <telerik:RadProgressArea style="margin-left:auto;margin-right:0px;" |
| ID="RadProgressArea1" |
| runat="server" |
| Height="58px" |
| ProgressIndicators="TotalProgressBar, TotalProgressPercent, TimeElapsed" |
| Skin="Office2007" > |
| <Localization Uploaded="Completed" /> |
| </telerik:RadProgressArea> |
| </ContentTemplate> |
| </telerik:RadWindow> |
| <telerik:RadProgressManager OnClientProgressStarted="progressStarted" ID="RadProgressManager1" runat="server" /> |
Greetings,
I am currently using version control RadAjaxManager 2010.3.1109.35 with the following problem:
I want to update a particular "asp: DropDownList" when the values of a "Telerik:RadMaskedTextBox" changed.
For this purpose i’m using the client event "OnValueChanged" to trigger a Ajax request, however, this scenario only works one time.
After the first ajax request, if i trigger the "OnValueChanged" again, the ajax request isn’t fired. I have done some debug and in the second time i trigger the event, the control RadAjaxManager in the client side is null.
How do I solve this problem?
Code executed in server side:
protected void Adabas_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) { string argument = (e.Argument); string[] arrayString = argument.Split(",".ToCharArray()); string operacao = arrayString[0]; if (operacao == "CarregarADABAS") { ptin.formare.lms.core.utilizadores.cnpj.gestaoCNPJ _gestcnpj = new ptin.formare.lms.core.utilizadores.cnpj.gestaoCNPJ("LMS_BD"); DataTable lista_ADABAS = _gestcnpj.ListaADABASPorCNPJ(arrayString[1]); ddAdabas.Items.Clear(); ddAdabas.DataSource = lista_ADABAS; ddAdabas.DataTextField = "ADABAS"; ddAdabas.DataValueField = "ADABAS"; ddAdabas.DataBind(); } } Code executed in cliente side:
<telerik:RadAjaxManager ID="Adabas" runat="server" onajaxrequest="Adabas_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Adabas"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ddAdabas" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function CarregaListaADABAS (sender, args) { var message = args.get_newValue(); message = message.replace(/[^a-zA-Z 0-9]+/g,''); var ajaxManager = $find("<%= Adabas.ClientID %>"); //This value is null in the second time (event OnValueChanged) if(ajaxManager != null) { ajaxManager.ajaxRequest('CarregarADABAS,'+ message); } } </script > </telerik:RadCodeBlock> <Telerik:RadMaskedTextBox ID="txt_cnpj" runat="server" Rows="1" UseEmbeddedScripts="False" Mask="##.###.###/####-##" TextWithLiterals="..-" CausesValidation="True" Width="125px" Height="11px" Skin="Outlook"> <ClientEvents OnValueChanged="CarregaListaADABAS"/> </Telerik:RadMaskedTextBox>
Regards
<telerik:RadRotator ID="rotator1" runat="server" BorderWidth="0" RotatorType="CoverFlowButtons" Width="100%" ItemWidth="64" Height="80px" ItemHeight="64" ScrollDuration="500" FrameDuration="2000" EnableRandomOrder="true" PauseOnMouseOver="false" Skin="Windows7" ScrollDirection="Left, Right" OnClientItemShown="OnClientItemShown" CssClass="RemoveRotatorBorder"> <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Url") %>' AlternateText='<%# Eval("Name") %>' /> </ItemTemplate> </telerik:RadRotator>Telerik.Web.UI.RadRotatorAnimation.set_scrollAnimationOptions("<%= rotator1.ClientID %>", { xR: 5, // The offset in pixels between the selected items and the first item on the left and on the right of the selected item. xItemSpacing: 20, matrix: { m11: 1, m12: 0, m21: -0.1, m22: 1 }, // The 2d transformation matrix, applied to the items that appear on the right of the selected item reflectionHeight: 0.5, // The height of the reflection reflectionOpacity: 1 // The opacity, applied to the reflection } );
var radAjaxMgr = $find('<%= PageRadAjaxManager.clientID %>'); radAjaxMgr.ajaxRequestWithTarget('<%= NotesGrid.clientID %>', ''); $find('<%= PageRadAjaxManager.clientID %>').ajaxRequest('Note');Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page) AddHandler manager.AjaxRequest, AddressOf PalNoteTaskListAjaxManager_AjaxRequest PageRadAjaxManager.AjaxSettings.AddAjaxSetting(manager, TaskGrid, lpWait)Protected Sub PalNoteTaskListAjaxManager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Select Case e.Argument Case "Task" PopulateTaskGrid(False) Case "CompTask" PopulateCompletedTaskGrid(False) Case "Note" FillNoteGrid(False) End Select End Sub<telerik:RadAjaxLoadingPanel id="lpWait" InitialDelayTime="0" runat="server" Transparency="10" Height="100%" Width="100%" > <table Height="200px" Width="100%" > <tr valign="middle" > <td align="center"> <img src="/SI/Images/status_anim.gif" title="Wait" /> </td> </tr> </table> </telerik:RadAjaxLoadingPanel>