/**
* 获取选中行的ID
* @return
*/
public String[] getSelectListId(){
String listId[] = null;
ArrayList blocks = tblMain.getSelectManager().getBlocks();
ArrayList idList = new ArrayList();
Iterator iter = blocks.iterator();
while(iter.hasNext()){
KDTSelectBlock block = (KDTSelectBlock)iter.next();
int top = block.getTop();
int bottom = block.getBottom();
for(int rowIndex = top;rowIndex<=bottom; rowIndex++){
ICell cell = tblMain.getRow(rowIndex).getCell(getKeyFieldName());
if(!idList.contains(cell.getValue())){
idList.add(cell.getValue());
}
}
}
if(idList!=null&&idList.size()>0){
Iterator iterat = idList.iterator();
listId = new String[idList.size()];
int index = 0 ;
while(iterat.hasNext()){
listId[index]=(String)iterat.next();
index++;
}
}
return listId;
}
金蝶BOS 获取列表界面所选择的行数的ID
最新推荐文章于 2020-12-29 09:33:14 发布