惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
G
GRAHAM CLULEY
Security Latest
Security Latest
C
Cyber Attacks, Cyber Crime and Cyber Security
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic
S
Secure Thoughts
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Help Net Security
Help Net Security
S
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - Franky
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Cloudflare Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
雷峰网
雷峰网
Forbes - Security
Forbes - Security
IT之家
IT之家
The Hacker News
The Hacker News
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News | PayPal Newsroom
AI
AI
博客园 - 三生石上(FineUI控件)
PCI Perspectives
PCI Perspectives
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
N
News and Events Feed by Topic
WordPress大学
WordPress大学
P
Palo Alto Networks Blog
S
SegmentFault 最新的问题
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Cyberwarzone
Cyberwarzone
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
Know Your Adversary
Know Your Adversary
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页

博客园 - sunrack

LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains ASPxPopupControl does not show up in the right place C++/CLI托管字符串与非托管char数组的转换 程序员从初级到中级10个秘诀 Grid Editing - Cascading Combo Boxes - sunrack ASPxRadioButtonList 报错解决办法 - sunrack - 博客园 本地连接属性“出现意外错误”的解决办法 - sunrack - 博客园 Bootstrap DotNetFX35SP1 in Visual Studio 2010 Windows Server 2008 共享策略 XtraPivotGrid Custom Summaries 手动注册 DevExpress 8.2.3 控件到 Visual Studio 工具箱 sn.exe error "Failed to generate a strong name key pair -- The keyset is not defined" Thread Tools Rate Thread 浅析JavaScript中的showModalDialog的实战应用 javascript showModalDialog模态对话框使用说明 - sunrack - 博客园 entity framework 缓存干扰的数据不一致问题 Failed to load viewstate ? Typical problem, with an obvious solution. ViewState and Dynamic Control ASPxGridView 和 AJAX Extensions ToolBox 不兼容 ASPxCombobox Features
Get JavaScript IntelliSense With DevExpress Client-Side Objects - v2010 vol 1
sunrack · 2010-12-10 · via 博客园 - sunrack

http://community.devexpress.com/blogs/aspnet/archive/2010/04/20/how-to-get-devexpress-javascript-intellisense.aspx

Add IntelliSense Support

Follow these 3 easy steps to add IntelliSense support to your project:

1. Install the latest DXperience v2010.1 release. (Currently, the DXperience v2010.1 beta is available to DXperience subscription license holders).

2. Click the ‘Add Existing Item’ in your project menu. Then add the ASPxScriptIntelliSense.js file to your project which should be located in the following folder:

%DevExpress Install Folder %\DevExpress2010.1\Components\Sources\DevExpress.Web.ASPxScriptIntellisense\ASPxScriptIntelliSense.js

For example, on my local machine the ASPxScriptIntelliSense.js file is located here:

C:\Program Files\DevExpress 2010.1\Components\Sources\DevExpress.Web.ASPxScriptIntellisense\ASPxScriptIntellisense.js

3. Type the following code in the page <body> section in the page that you want to enable JavaScript IntelliSense:

view plain | print | copy to clipboard

1
<% if (DesignMode){ %>  

2
    <script src="../ASPxScriptIntelliSense.js" type="text/javascript"></script>  

3
<% } %> 

<% if (DesignMode){ %>
    <script src="../ASPxScriptIntelliSense.js" type="text/javascript"></script>
<% } %>  

Note: It's important to check the “if(DesignMode)” statement because it helps to avoid additional round trips to the server for the ASPxScriptIntelliSense.js file. It also helps to prevent mixing up the IntelliSense schema classes and production scripts classes.

That's it - you now have full IntelliSense support for DevExpress client controls in BLOCKED SCRIPT

asp-intelllisense-popup

New Cast Methods

We’ve also added special static Cast methods which enable you to cast the DevExpress control's client object and then get the client object’s properties, methods and events via IntelliSense.

(e.g. ASPxClientButton.Cast(obj), ASPxClientTreeList.Cast(obj), etc.). You can use these methods with event arguments:

view plain | print | copy to clipboard

1
<script type="text/javascript">  

2
function OnGridRowDblClick(s, e) {  

3
var gridInstance = ASPxClientGridView.Cast(s);  

4
        gridInstance.StartEditRow(gridInstance.GetFocusedRowIndex());  

5
    }  

6
</script>

<script type="text/javascript">
    function OnGridRowDblClick(s, e) {
        var gridInstance = ASPxClientGridView.Cast(s);
        gridInstance.StartEditRow(gridInstance.GetFocusedRowIndex());
    }
</script>

These new cast methods also accept the ClientInstanceName of the client object. Therefore, to get a client object with IntelliSense support, simply pass the ClientInstanceName as a string to the Cast method:

view plain | print | copy to clipboard

1
<form id="form1" runat="server">  

2
<script type="text/javascript">  

3
        function OnGridRowClick(s, e) {  

4
            var gridInstance = ASPxClientGridView.Cast("grid");  

5
        }  

6
</script>

7
<div>

8
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="grid">  

9
<ClientSideEvents Init="OnGridRowClick" />

10
</dx:ASPxGridView>

11
</div>

12
</form>

<form id="form1" runat="server">
    <script type="text/javascript">
        function OnGridRowClick(s, e) {
            var gridInstance = ASPxClientGridView.Cast("grid");
        }
    </script>
    <div>
        <dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="grid">
            <ClientSideEvents Init="OnGridRowClick" />
        </dx:ASPxGridView>
    </div>
</form>
Cast Sender Object

You also get JavaScript IntelliSense for the gridInstance variable. For example, this method shows how you can cast the sender object and get JavaScript IntelliSense:

Fig.1:

dc6fqjjf_92dd7536cq_b

Fig.2:

dc6fqjjf_93rsd6q9cz_b

Fig.3:

dc6fqjjf_94dw78vbgg_b

Standalone JavaScript File Support

If you want to enable IntelliSense for our controls in a standalone JavaScript file then simply add a reference to our ASPxScriptIntelliSense file at the top:

asp-intelllisense-individual

Please note that this feature is only available in Visual Studio 2008 and 2010.