|
Re: Deleting a column in a table [message #507785 is a reply to message #507737] |
Thu, 14 January 2010 16:22 |
|
Agreed. Can you open an enhancement request to add a call to the
TableHandle to delete a specific column?
Jason
john mcteague wrote:
> Is there a simpler way to drop a column on a table than the following:
> TableHandle table = ....
> int colIdx = ....
> ColumnHandle colHandle = table.findColumn(colIdx);
> colHandle.dropAndClear();
> Iterator detailIt = table.getDetail().iterator();
> while(detailIt.hasNext()){
> RowHandle handle = (RowHandle)detailIt.next();
> handle.getCells().get(colIdx).dropAndClear();
> }
> Iterator footerIt = table.getFooter().iterator();
> while(footerIt.hasNext()){
> RowHandle handle = (RowHandle)footerIt.next();
> handle.getCells().get(colIdx).dropAndClear();
> }
> Iterator headerIt = table.getHeader().iterator();
> while(headerIt.hasNext()){
> RowHandle handle = (RowHandle)headerIt.next();
> handle.getCells().get(colIdx).dropAndClear();
> }
>
> It seems somewhat long winded....
|
|
|
Powered by
FUDForum. Page generated in 0.03026 seconds