当前位置: 首页 > 工具软件 > dep > 使用案例 >

客户端DEP相关

阙阳夏
2023-12-01

list-获取选中行id

//获取选中id
var uiCtx=pluginCtx.getUI();
    var mode = 0;
    var tblMain = pluginCtx.getKDTable("tblMain");
    var blockList = tblMain.getSelectManager().getBlocks();

    if ((blockList != null) && (blockList.size() == 1)) {
      mode = (tblMain.getSelectManager().getBlocks().get(0)).getMode();
    }
    var selectList = new java.util.ArrayList();
    var selectKeyIdFields = null;
    var selectRows = com.kingdee.bos.ctrl.kdf.table.util.KDTableUtil.getSelectedRows(tblMain);
    var idList = com.kingdee.eas.framework.client.ListUiHelper.getSelectedIdValues(tblMain, "id", selectList, selectKeyIdFields);


var size =idList.size();
com.kingdee.eas.util.client.MsgBox.showInfo("选中条数"+size);

 类似资料: