标签:ase selected 保存 UNC let sel easyui OWIN warning
//上移 function upBtn() { var selected = $(‘#caseTable‘).datagrid(‘getSelected‘); var index = $(‘#caseTable‘).datagrid(‘getRowIndex‘,selected); if(index==0){ $.messager.alert(‘系统提示‘, ‘顶行无法上移!‘, ‘warning‘); } else { var rows = $(‘#caseTable‘).datagrid(‘getRows‘); var row = rows[index]; $(‘#caseTable‘).datagrid(‘deleteRow‘, index);//删除一行 index--; $(‘#caseTable‘).datagrid(‘insertRow‘, { index:index, row:row }); var loadRows = $(‘#caseTable‘).datagrid(‘getRows‘); loadRows[index].ROWNUM_ = index + 1; loadRows[index + 1].ROWNUM_ = index + 2; $(‘#caseTable‘).datagrid(‘loadData‘,loadRows); } } //下移 function downBtn() { var selected = $(‘#caseTable‘).datagrid(‘getSelected‘); var index = $(‘#caseTable‘).datagrid(‘getRowIndex‘,selected); var rows = $(‘#caseTable‘).datagrid(‘getRows‘); var rowlength=rows.length if(index==rowlength-1){ $.messager.alert(‘系统提示‘, ‘底行无法下移!‘, ‘warning‘); }else{ var row = rows[index]; $(‘#caseTable‘).datagrid(‘deleteRow‘, index);//删除当前行 index++; $(‘#caseTable‘).datagrid(‘insertRow‘, { index:index, row:row }); var loadRows = $(‘#caseTable‘).datagrid(‘getRows‘); loadRows[index].ROWNUM_ = index + 1; loadRows[index - 1].ROWNUM_ = index; $(‘#caseTable‘).datagrid(‘loadData‘,loadRows); } }
easyUI table行上移下移 同时更新序号可使保存按新顺序
标签:ase selected 保存 UNC let sel easyui OWIN warning
原文地址:https://www.cnblogs.com/lonske/p/12132998.html