Wednesday, December 15, 2010

Tip# 6: Checkbox in Grid' column header

  1. Problem: 
  2. wanted to show checkboxes as row selection in SmartGWT so i found this solution from Showcase
  ListGrid recipientGrid = new ListGrid();
  1. recipientGrid.setWidth(350);  
  2. recipientGrid.setHeight(250);
  3. recipientGrid.setShowAllRecords(true);
  4. recipientGrid.setSelectionType(SelectionStyle.SIMPLE);  
  5. recipientGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);

  6. I used DataSource to fill the ListGrid but the checkbox in Grid's column 
    header was not allowing to check the checkbox and was showing an 
    warning message in tooltip.






    the warning message is:

    "Can't select that many records Please try working in smaller batches"
even I fill datasource with less than 10 records it did not work.

Solution:
     Replace the datasource with ListGridRecord[] data. Now it can work for both small and larges batches.  


1 comment:

  1. welcome asad to the worlds of blogs.
    nice to see you hear and may allah give you courage to write more & more. keep it up(Y)

    ReplyDelete