Tuesday, January 11, 2011

Tip # 9: Sorting ListGrid Data at runtime

listgrid.sort("columnName", SortDirection.ASCENDING);

Saturday, January 8, 2011

Tip# 8: Tooltip in ListGrid

Tooltip can be set at the level of ListGrid widget and at the level of row (ListGridRecord). Here are both mentioned:
1 - ListGrid Level
      listgrid.setTooltip("Here is your tooltip");
2 - ListGridRecord Level
       listgridfield.setShowHover(true); // it allows to tooltip at the level of grid row, by default it will show the text in the field but if you want to show the custom tooltip then use the following code 
listgridfield.setHoverCustomizer(new HoverCustomizer() {

     @Override
     public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
return "Here is the custom value to show as a tooltip of the listgridfield (column)";
}
});