eas之得到当前选中的行id


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;
}
}

猜你喜欢

转载自www.cnblogs.com/luojiabao/p/11087773.html
今日推荐