//分录添加监听事件
kdtEntrys.addKDTPropertyChangeListener(new KDTPropertyChangeListener() {
public void propertyChange(KDTPropertyChangeEvent e) { //当触发时
String column = kdtEntrys.getColumn(e.getColIndex()).getKey(); //获取到是哪个格子
if ("amount".equals(column)) { //判断触发的格子是否自己需要的进行逻辑处理的
//自己的逻辑
}
}
});
//分录行删除监听
kdtEntrys_detailPanel.addRemoveListener(new IDetailPanelListener() {
public void afterEvent(DetailPanelEvent event) throws Exception {}
public void beforeEvent(DetailPanelEvent event) throws Exception {}
});
// 分录新增监听,当新增分录行
kdtEntrys_detailPanel.addAddListener(new IDetailPanelListener() {
public void afterEvent(DetailPanelEvent e) throws Exception {
//事件发生后处理
}
public void beforeEvent(DetailPanelEvent e) throws Exception {
//事情发生前处理
***Info objectValue = ( ****Info) e.getObjectValue();
}
});
//插入分录行,
kdtEntrys_detailPanel.addInsertListener(new IDetailPanelListener() {
public void afterEvent(DetailPanelEvent e) throws Exception {}
public void beforeEvent(DetailPanelEvent e) throws Exception {
//事情发生前处理
****Info objectValue = ( **** Info) e.getObjectValue();
}
});