GXT Grid Column Word Wrap

I would like to apply word wrap to a single column.
Just need to set a custom renderer.  
 
cm.getColumnById("proddesc").setRenderer(new GridCellRenderer<ModelData>() {
  @Override
  public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {
    return "<div style=\"white-space:normal !important;\">"+ model.get(property) +"</div>";
  }
});
Source : http://stackoverflow.com/questions/2106104/word-wrap-grid-cells-in-ext-js

0 comments:

 
Copyright © peyotest