论坛首页 Web前端技术论坛

wijmo5 flexgrid基础一:数据绑定

浏览 1244 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2015-10-28   最后修改:2015-10-28

wijmo5 FlexGrid在JavaScript程序的启动

1.添加Wijmo引用

2.添加wijmo控件的扩展

3.在JavaScript中初始化wijmo控件。

4.(可选)添加css和自定义的样式文件。

代码参考:

1
2
3
4
5
6
7
8
9
10
11
12
<head>
  <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
  <link rel="stylesheet" type="text/css" href="css/wijmo.css" />
  <link href="css/app.css" rel="stylesheet" type="text/css" />
 
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/bootstrap.js" type="text/javascript"></script>
 
  <script src="scripts/wijmo.js" type="text/javascript"></script>
  <script src="scripts/wijmo.input.js" type="text/javascript"></script>
  <script src="scripts/wijmo.grid.js" type="text/javascript"></script>
</head>

 简单数据绑定

使用flexgrid的itemsSource属性设置数据源就可以实现简单的绑定:

代码参考:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<script type="text/javascript">
margin: 0px !important; padding: 0px 1em !important; border-radius: 0px !important; border: 0px !important; float: none !important; height: auto !important; line-height: 1.1em !important; overflow: visible !important; vertical-align: baseline !important; width: auto !important;
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics