Hello!
I want to make a TreeGrid with button in cells of one column, and found http://www.smartclient.com/smartgwt/showcase/#grid_cell_widgets where I can put button in ListGrid. But when I try to use it in TreeGrid, the function createRecordComponent is not called, and my button doesn't appear. How can it be solved? Thanks in advance.
SmartGWT v8.3_2012-11-20/LGPL Development only
Firefox 15.0.1
I want to make a TreeGrid with button in cells of one column, and found http://www.smartclient.com/smartgwt/showcase/#grid_cell_widgets where I can put button in ListGrid. But when I try to use it in TreeGrid, the function createRecordComponent is not called, and my button doesn't appear. How can it be solved? Thanks in advance.
SmartGWT v8.3_2012-11-20/LGPL Development only
Firefox 15.0.1
Code:
final TreeGrid treeGrid = new TreeGrid() { @Override protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) { Window.alert("Test"); // I detected the function is not called using this line String fieldName = this.getFieldName(colNum); if (fieldName.equals("ButtonLocoDrill")) { Button bLocoDrill = new Button("Test"); bLocoDrill.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.alert("Test"); } }); return bLocoDrill; } return null; } };
Comment