or

if(this._dockMode){this._contentElement.style.width="1px";RadWindow window = new RadWindow(); window.ID = "AsyncErrorMessageWindow"; window.ClientIDMode = ClientIDMode.Static; HtmlGenericControl contentDiv = new HtmlGenericControl("div"); contentDiv.ID = "AsyncErrorMessageWindowContent"; contentDiv.Attributes["class"] = "AsyncErrorMessageWindow_Content"; window.ContentContainer.Controls.Add(contentDiv); Form.Controls.Add(window);function onEndRequest(sender, args) { // error handler if (args.get_error()) { var message = args.get_error().message; args.set_errorHandled(true); if (args.get_error().name === 'Sys.WebForms.PageRequestManagerServerErrorException') { if (args._error.httpStatusCode == 0) { return false; } } var window = $find('AsyncErrorMessageWindow'); var windowContent = $('.AsyncErrorMessageWindow_Content'); windowContent.text(message); window.set_modal(true); window.set_title(ae_data.title); window.autoSize(); window.show(); } return true;}<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="DB2_Data._Default" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"></asp:Content><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> </telerik:RadScriptManager> </h2>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="RadGrid1" Width="97%" AllowPaging="True" PageSize="14" AllowSorting="True" runat="server" AllowCustomPaging="true" VirtualItemCount="622840"> <PagerStyle Mode="NumericPages" /> <MasterTableView TableLayout="Fixed" /> <ClientSettings> <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling> </ClientSettings> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASWConnectionString %>" SelectCommand="SELECT * FROM [DB2_Customers]" ProviderName="System.Data.SqlClient"></asp:SqlDataSource></asp:Content>Imports System.DataImports System.Data.SqlClientImports System.Collections.GenericImports Telerik.Web.UIPublic Class _Default Inherits System.Web.UI.Page Private Function GetDataTable(ByVal queryString As String) As DataTable Dim ConnString As String = ConfigurationManager.ConnectionStrings("ASWConnectionString").ConnectionString Dim MySqlConnection As New SqlConnection(ConnString) Dim MySqlDataAdapter As New SqlDataAdapter MySqlDataAdapter.SelectCommand = New SqlCommand(queryString, MySqlConnection) Dim myDataTable As New DataTable MySqlConnection.Open() Try MySqlDataAdapter.Fill(myDataTable) Finally MySqlConnection.Close() End Try Return myDataTable End Function Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource RadGrid1.DataSource = GetDataTable("SELECT * FROM db2_customers WHERE ID BETWEEN " & ((RadGrid1.CurrentPageIndex * RadGrid1.PageSize) + 1) & " AND " & ((RadGrid1.CurrentPageIndex + 1) * RadGrid1.PageSize)) End SubEnd Classpop up window which will not close. The only way to close the RadWindow is window.Close () from client side which is not working in this case.
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseWin() {
//Get the RadWindow
var oWindow = GetRadWindow();
//Call its Close() method
if (oWindow) {
oWindow.Close();
// alert(oWindow.isClosed())
}
//GetRadWindow().close();
// return false;
//oWindow.close();
}
nothing works.