Note that there are some explanatory texts on larger screens.

plurals
  1. POTelerik RadWindow problem
    text
    copied!<p>I am kinda new to c# and I am kinda new to telerik. I have this problem:</p> <p>I am opening a telerik window on the click of a button and then on the click of button placed in telerik window I want to update the grid (Telerik Grid) on parent window, I successfully update the telerik grid without doing a postback. But then when I click on the button in telerik window, it does its work and also updates the grid, but it again opens a new telrik window.</p> <p>I am not sure why this is happing. Below is a snippet of the code. Any suggestion would be greatly appreciated.</p> <p>Java script functions on RejectLeaveRequest.aspx(telerik window):</p> <pre><code>function CloseAndRebind(args) { GetRadWindow().close(); GetRadWindow().BrowserWindow.refreshGrid(args); } function GetRadWindow() { var oWindow = null; if (window.radWindow) { oWindow = window.radWindow; } else if (window.frameElement.radWindow) { oWindow = window.frameElement.radWindow; } return oWindow; } </code></pre> <p>Code behind for RejectLeaveRequest.aspx.cs(telerik window):</p> <pre><code>protected void btnReject_Click(object sender, EventArgs e) { //Code for delete records // ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind(this);", true); // Call client method in radwindow page } </code></pre> <p>Java script functions on Approval.aspx:</p> <pre><code>function refreshGrid() { $find("&lt;%= RadAjaxManager1.ClientID %&gt;").ajaxRequest("Rebind"); } &lt;telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"&gt; &lt;AjaxSettings&gt; &lt;telerik:AjaxSetting AjaxControlID="RadAjaxManager1"&gt; &lt;UpdatedControls&gt; &lt;telerik:AjaxUpdatedControl ControlID="gvLeaveApproval" /&gt; &lt;/UpdatedControls&gt; &lt;/telerik:AjaxSetting&gt; &lt;telerik:AjaxSetting AjaxControlID="gvLeaveApproval"&gt; &lt;UpdatedControls&gt; &lt;telerik:AjaxUpdatedControl ControlID="gvLeaveApproval" /&gt; &lt;/UpdatedControls&gt; &lt;/telerik:AjaxSetting&gt; &lt;/AjaxSettings&gt; &lt;/telerik:RadAjaxManager&gt; &lt;asp:UpdatePanel ID="updRadWindow" UpdateMode="Conditional" runat="server"&gt; &lt;ContentTemplate&gt; &lt;telerik:RadWindowManager ID="RadWindowManager1" runat="server" &gt; &lt;/telerik:RadWindowManager&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>Code behind for Approval.aspx:</p> <pre><code>protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) { if (e.Argument == "Rebind") { SelectEmployeeLeaveRequested(); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload