易截截图软件、单文件、免安装、纯绿色、仅160KB

ReportViewer JavaScript API


JavaScript API
One of the new features we added to the ASP.Net Report Viewer in Visual Studio 2010 is a JavaScript API to allow you to interact with the viewer on client.  In reading many of the posts on the report controls forum, we found that many people struggle when implementing a custom toolbar or replacing portions of the toolbar functionality.  The new JavaScript API is intended to make it easier for you to provide the same functionality available through the built-in toolbar with a minimum amount of effort.
The JavaScript API is exposed through the client side ReportViewer object.  Specifically, it’s the Microsoft.Reporting.WebFormsClient.ReportViewer class.  An instance of this class is created on the client for each instance of the ReportViewer control on the page.
Referencing the client side viewer
The ReportViewer client side object inherits from Sys.UI.Control.  To obtain a reference to the client side viewer, use the $find method as follows:
    var clientViewer = $find("ReportViewer1");
The identifier you pass to $find corresponds to the ClientID of the ReportViewer server control.
Checking the state of the viewer
Once you have a reference to the client side viewer, you will want to check the state of the viewer before invoking most of the various methods and properties it exposes.  When the viewer is in a loading state, most of the functionality of the client viewer is unavailable and will throw an exception if called.  The viewer is loading whenever an asynchronous postback is in progress.  It is also in the loading state while retrieving a report page.  This usually happens during an asynchronous postback, but can also extend beyond the lifetime of the postback, such as while retrieving images displayed on the report page.  To check the state of the viewer, use the isLoading property:
    var isLoading = clientViewer.get_isLoading();
Once you have dete


相关文档:

javascript调用父窗口(父页面)的方法

javascript调用父窗口(父页面)的方法
window.parent与window.opener的区别 javascript调用主窗口方法
1:   window.parent 是iframe页面调用父页面对象
举例:
a.html
Html代码
<html>  
    <head><title>父页面</title></head> &nb ......

JavaScript:prototype属性使用方法

一、基本使用方法
      prototype属性可算是JavaScript与其他面向对象语言的一大不同之处。
简而言之,prototype就是“一个给类的对象添加方法的方法”,使用prototype属性,可以给类动态地添加方法,以便在JavaScript中实现“继承”的效果。
    & ......

学习笔记 JavaScript基础

JavaScript基础
stringObject.charAt(index)方法:返回指定索引位置处的字符。
stringObject.slice(start,[end])和stringObject.substring(start,[end])方法都接受两个参数,分别为子字符串的起始位置和终止位置,返回这两者之间的字符串,不包括终止位置的那个字符串。如果不指定第二个参数,则默认为字符串的长度,即 ......

用JavaScript去除字符串的首尾空格。

String.prototype.Trim=function(){
returnthis.replace(/(^\s*)|(\s*$)/g,"");
}
String.prototype.LTrim=function(){
returnthis.replace(/(^\s*)/g,"");
}
String.prototype.RTrim=function(){
returnthis.replace(/(\s*$)/g,"");
} ......

JavaScript方法和技巧大全

             JavaScript方法和技巧大全
1:基础知识
1 创建脚本块
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 隐藏脚本代码
1: <script language=”JavaScript”>
2: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号