开发过程中需要对KDTable表格单元格中的数值型显示为后面加年,比如输入的是“3”,但要求显示为“3年”,代码如下即可:
this.tblMain.getColumn(0).getStyleAttributes().setNumberFormat("#年");
如果输入“30”要显示为“30%”,代码写法如下:
this.tblMain.getColumn(0).getStyleAttributes().setNumberFormat("#//%")
开发过程中需要对KDTable表格单元格中的数值型显示为后面加年,比如输入的是“3”,但要求显示为“3年”,代码如下即可:
this.tblMain.getColumn(0).getStyleAttributes().setNumberFormat("#年");
如果输入“30”要显示为“30%”,代码写法如下:
this.tblMain.getColumn(0).getStyleAttributes().setNumberFormat("#//%")