/**
* 格式化table
* @param table
* @param cols
*/
public static void formatTableNumber(KDTable table,String[] cols)
{
String colFormat = "%{#,###.####}f";
for (int i = 0; i < cols.length; i++) {
table.getColumn(cols[i]).getStyleAttributes().setNumberFormat(colFormat);
}
}
public static void formatTableDate(KDTable table,String[] cols)
{
String colFormat = "%{yyyy-MM-dd}t";
for (int i = 0; i < cols.length; i++) {
table.getColumn(cols[i]).getStyleAttributes().setNumberFormat(colFormat);
}
}
String [] cols=new String[]{"amount","totalAmount","unAmount"};
formatTableNumber(tblMain, cols);