That’s my question in a nutshell. I’ve setup the ListGrid as follows
ListGrid lstGrid = new ListGrid();
lstGrid.setWidth(80);
lstGrid.setHeight(260);
lstGrid.setCanSelectAll(true);
lstGrid.setCanFreezeFields(false);
lstGrid.setShowAllRecords(true);
lstGrid.setCanMultiSort(false);
lstGrid.setCanSort(true);
lstGrid.setCanGroupBy(false);
lstGrid.setCanReorderFields(false);
ListGridField codeField = new ListGridField("data", columnName);
codeField.setCanEdit(false);
lstGrid.setEditEvent(ListGridEditEvent.CLICK);
lstGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
lstGrid.setSelectionType(SelectionStyle.SIMPLE);
lstGrid.setFields(new ListGridField[] {codeField});
lstGrid.selectAllRecords();
So it shows all the list items as selected, but not the header item. To get them consistent, I have to first click on the header to uncheck everything, then click on the header again to check everything. I want the header to be checked through the code, without user intervention.
thanks