- 注册时间
- 2019-3-1
- 最后登录
- 2023-5-31
- 阅读权限
- 10
- 积分
- 2546
- 精华
- 0
- 帖子
- 467
|
本帖最后由 happylover1278 于 2019-4-11 17:59 编辑
- function render_4 (e) {
- var uid = e.record._uid
- var htmlStr = '<a class="Delete_Button" href="javascript:delRow(\'' + uid + '\')">删除</a>'
- return htmlStr;
- }
- //当前行删除逻辑
- var datagrid_main = mini.get('datagrid_main')
- function delRow(row_uid) {
- var row = datagrid_main.getRowByUID(row_uid);
- if (row) {
- if (confirm("确定删除此记录?")) {
- datagrid_main.removeRow(row)
- }
- }
- }
复制代码 求解 哪里写错了
- <div style="padding-bottom: 100px;width: 70%;margin-left: 20px;margin-top: 20px;margin-bottom: 100px;">
- <div id="datagrid_main" class="mini-datagrid" style="width:99%;height:auto;" idField="id" multiSelect="true" frozenStartColumn="0"
- frozenEndColumn="-1" sizeList="[10,15,30,50]" pageSize="15" showReloadButton="false" showPager="false">
- <div property="columns">
- <div field="id" visible="false"></div>
- <div type="indexcolumn" ></div>
- <div name="sccs" align="center" width="90" headerAlign="center" renderer="render_1">厂商</div>
- <div name='jxs' align="center" width="120" headerAlign="center" renderer="render_2">经销商</div>
- <div name="gys" align="center" width="80" headerAlign="center" renderer="render_3">供应商</div>
- <div name="cz" align="center" width="60" headerAlign="center" renderer="render_4">操作</div>
- </div>
- </div>
- </div>
复制代码
|
|