- 注册时间
- 2013-2-19
- 最后登录
- 2013-8-12
- 阅读权限
- 10
- 积分
- 111
- 精华
- 0
- 帖子
- 26
|
HTML 代码
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>CellEdit 单元格编辑 </title>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <link href="http://www.miniui.com/demo/demo.css" rel="stylesheet" type="text/css" />
-
- <script src="http://www.miniui.com/scripts/boot.js" type="text/javascript"></script>
-
- <!--引入皮肤样式-->
- <link href="http://www.miniui.com/scripts/miniui/themes/blue/skin.css" rel="stylesheet" type="text/css" />
-
- </head>
- <body>
- <h1>CellEdit 单元格编辑</h1>
- <div id="datagrid1" class="mini-datagrid" style="width:800px;height:280px;"
- url="TextFile1.txt" idField="id"
- allowResize="true" pageSize="20"
- allowCellEdit="true" allowCellSelect="true" multiSelect="true"
- editNextOnEnterKey="true"
- >
- <div property="columns">
- <div field="Amount" width="100">数量
- <input property="editor" class="mini-spinner" value="0.0000" style="width:100%;"/>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- mini.parse();
- var grid = mini.get("datagrid1");
- grid.load();
- </script>
- </body>
- </html>
复制代码 TextFile1.txt 内容
- {
- "total": 2,
- "data": [
- {
- "Amount": 2390492.0000
- },
- {
- "Amount": 534571200.03
- },
- {
- "Amount": 5678
- }
- ]
- }
复制代码 问题描述:
无论点击哪个单元格,数值都会变成 100,并且单元格变成已更改状态
|
|