其实有个快捷键:ctrl+shift+C 就可以直接拿到了....
public String[] getSelected(){ checkSelected; //SelectManager是kdtable中行管理类 ArrayList bolcks=tblMain.getSelectManager().getBlocks(); ArrayList idList=new ArrayList(); Iterator iterator=block.iterator(); while(iterator.hasNext()){ KDTSelectBlock block=(KDTSelectBlock)iterator.next(); int top=block.getTop(); int bottom=block.getBottom(); for(int rowIndex=top;rowIndex<=bottom;rowIndex++){ ICell cell=tbMain.getRow(rowIndex).getCell(getKeyFieldName());//获取指定分录的单元格的对象 if(idList.contains(cell.getValue())){ idList.add(cell.getValue()); } } } String[] listId=null; if(idList!=null && idList.size()>0){ Iterator iterator=idList.iterator(); listId=new String[idList.Size()]; int index=0; while(iterator.hasNext()){ listId[index]=(String)iterator.next(); index++; } return listId; }}