Search code examples
javagwtevent-handlinggxt

ext gwt grid event


how do i get a cell value in GridEvent when clicking on a certain row.

I want to vave something like: (look at the Wishful thinking):

grid.addListener(Events.RowDoubleClick, new Listener<BaseEvent>() {

                @Override
                public void handleEvent(BaseEvent be) {
                    GridEvent gr = (GridEvent) be;

                    //Wishful thinking
                    String cellData = gr.getRow(gr.getRowIndex()).getCellValue("id")

                }

            });

Thanks...


Solution

  • gr.getGrid().getView().getCell(gr.getRowIndex(),colNum)
    

    If you have a BeanModel linked to the grid you can just do

    gr.getModel().get("propertyName")