1.引用DX程序集
项目引用如下程序集
- DevExpress.Charts.v16.2.Core
- DevExpress.Dashboard.v16.2.Core
- DevExpress.Dashboard.v16.2.Web
- DevExpress.Dashboard.v16.2.Web.Mvc
- DevExpress.Data.v16.2
- DevExpress.DataAccess.v16.2
- DevExpress.Office.v16.2.Core.dll
- DevExpress.PivotGrid.v16.2.Core
- DevExpress.Printing.v16.2.Core
- DevExpress.RichEdit.v16.2.Core.dll
- DevExpress.SpellChecker.v16.2.Core
- DevExpress.Spreadsheet.v16.2.Core
- DevExpress.Utils.v16.2
- DevExpress.Web.ASPxGauges.v16.2
- DevExpress.Web.ASPxHtmlEditor.v16.2
- DevExpress.Web.ASPxPivotGrid.v16.2
- DevExpress.Web.ASPxRichEdit.v16.2
- DevExpress.Web.ASPxScheduler.v16.2
- DevExpress.Web.ASPxSpellChecker.v16.2
- DevExpress.Web.ASPxSpreadsheet.v16.2
- DevExpress.Web.ASPxThemes.v16.2
- DevExpress.Web.ASPxTreeList.v16.2
- DevExpress.Web.Mvc.v16.2 (or DevExpress.Web.Mvc5.v16.2 if using ASP.NET MVC 5)
- DevExpress.Web.v16.2
- DevExpress.Xpo.v16.2
- DevExpress.XtraCharts.v16.2
- DevExpress.XtraCharts.v16.2.Web
- DevExpress.XtraGauges.v16.2.Core
- DevExpress.XtraGauges.v16.2.Presets
- DevExpress.XtraPivotGrid.v16.2
- DevExpress.XtraReports.v16.2
- DevExpress.XtraReports.v16.2.Web
- DevExpress.XtraScheduler.v16.2.Core
2.在Web.config中注册Http Handler
注册ASPxHttpHandlerModule:
Web.config > configuration > system.web > httpModules 和 configuration > system.webService > modules 中,注册ASPxHttpHandlerModule。
注册文件上次使用的ASPxUploadProgressHttpHandler
在Web.config > configuration > system.web > httpHandlers 和 configuration > system.webServer > handlers中,注册ASPxUploadProgressHttpHandler。
3.在~/Views/Web.config中注册DX的命名空间
注册视图使用的DevExpress命名空间
4.在Web.config中注册DevExpress的配置项
5.附加必须的JavaScript脚本
@Html.DevExpress().GetScripts( new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout }, new Script { ExtensionSuite = ExtensionSuite.HtmlEditor }, new Script { ExtensionSuite = ExtensionSuite.GridView }, new Script { ExtensionSuite = ExtensionSuite.PivotGrid }, new Script { ExtensionSuite = ExtensionSuite.Editors }, new Script { ExtensionSuite = ExtensionSuite.Chart }, new Script { ExtensionSuite = ExtensionSuite.Report }, new Script { ExtensionSuite = ExtensionSuite.Scheduler }, new Script { ExtensionSuite = ExtensionSuite.TreeList }, new Script { ExtensionSuite = ExtensionSuite.Spreadsheet }, new Script { ExtensionSuite = ExtensionSuite.RichEdit }, new Script { ExtensionSuite = ExtensionSuite.SpellChecker })
6.附加必须的Css样式
7.设置路由
8.重写默认模型绑定
9.移除默认项目的CSS样式
10.检查视图文档类型
11.添加扩展代码