We wanted to use Checkboxes as radio button and felt that overriding our Listgrid with createRecordComponent as shown below was a best approach but what we see is two widgets in each cell that we added a Record component.(One is the ImgButton that we created on createRecordComponent and another one is ‘img’ object coming from ‘skins/EnterpriseBlue/images/DynamicForm/[un]checked_Disabled.png’ )
The other issue that we see is when we freeze another (arbitrary column) the widget that was created using record component gets hidden and the other one is disabled.
Any help would be highly appreciated.
PS. Using 2.5 of smartgwt and 8.1 of SmartClient.
Thanks,
Attached you will find the screen shot as well as all my test scenarios.
...
testGrid = new ListGrid() {
@Override
protected Canvas createRecordComponent(final ListGridRecord record, java.lang.Integer colNum) {
final String fieldName = this.getFieldName(colNum);
if (fieldName.equals("A") || fieldName.equals("B") || fieldName.equals("C")) {
final ImgButton button = new ImgButton();
button.setHeight(11);
button.setWidth(11);
button.setShowRollOver(false);
button.setShowRollOverIcon(false);
button.setSrc("../images/silk/check.png");
button.setActionType(SelectionType.RADIO);
button.setRadioGroup("rentra" + record.getAttribute("pk"));
button.setSelected(record.getAttributeAsBoolean(fieldName));
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
SC.say("Clicked : " + fieldName);
}
});
return button;
} else {
return null;
}
}
};
...
testGrid.setAutoFetchData(true);
testGrid.setRecordComponentPoolingMode(RecordComponentPoolingMode.DATA);
testGrid.setRecordComponentPosition(EmbeddedPosition.WITHIN);
testGrid.setShowRecordComponents(true);
testGrid.setRecordComponentHeight(12);
testGrid.setShowRecordComponentsByCell(true);
testGrid.setEditEvent(ListGridEditEvent.CLICK);
testGrid.setDataSource(testDS);

GwtTest.java (3.68 KB)
GwtTestXmlDS.java (2.01 KB)
GwtTest.html (2.5 KB)
gwttest.data.xml (599 Bytes)