If not, then:
Code:
ListGridField commissionValueGridAgent = new ListGridField( "commissionValueAgent", "Commission Value"); commissionValueGridAgent.setCellFormatter(...)
I already try that one.
I have a code like this.
Code:
commissionValueGridAgent.setCellFormatter(new CellFormatter() { @Override public String format(Object value, ListGridRecord record, int rowNum, int colNum) { long commissionValue = record.getAttributeAsLong("percentCommissionAgent"); return ""+commissionValue; } });
Code:
agentListGrid.addEditorExitHandler(new EditorExitHandler() { @Override public void onEditorExit(EditorExitEvent event) { if(event.getColNum() == 1){ ListGridRecord record = (ListGridRecord)event.getRecord(); int gdpFieldNum = agentListGrid.getFieldNum("commissionValueAgent"); agentListGrid.refreshCell(event.getRowNum(), gdpFieldNum, true, true); SC.warn(record.getAttribute("percentCommissionAgent")+"::"+commissionValueGridAgent.getValueField()); } } });
And then when i click on that cell again, their values appear.
Please see the attached images. Thank you!
Leave a comment: