View Full Version : How to add a button in an editable grid

11 May 2009, 7:41 PM
Hi all,
i want to add a button at the last column on each row of an editable grid using following code:

final Button buttonInGrid = new Button(i18n.resetButton(),
new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
GWT.log("buttonInGrid is clicked...", null);
final AdapterField adaptField = new AdapterField(buttonInGrid);
CellEditor editorBtn = new CellEditor(adaptField) {
public Object preProcessValue(Object value) {
return ((Button)adaptField.getWidget());

public Object postProcessValue(Object value) {
return ((Button)adaptField.getWidget());
But the buttons only appear, when I click on its cell. I would like to make all buttons appear at the first time when the editable grid is loaded. How can I achieve it?
Thanks in advanced!

13 May 2009, 3:30 AM
You set tha button as an editor. They only appear of you want to edit that cell.

The next GXT2 release (M2) will ship with a grid widgetrenderer