Disable a single cell in a ListGrid

Hallo

I have a little question about the ListGrid. I have a ListGrid with a six ListGridFields. The type of five of them are boolean.

bestaetigenField.setType(ListGridFieldType.BOOLEAN);
aenderungField.setType(ListGridFieldType.BOOLEAN);
neuzugangField.setType(ListGridFieldType.BOOLEAN);
spLoeField.setType(ListGridFieldType.BOOLEAN);
lesenField.setType(ListGridFieldType.BOOLEAN);

getGridAnzeige().setFields(new ListGridField[] {klasseField, lesenField, bestaetigenField, aenderungField, neuzugangField, spLoeField});

If I put data in the Grid I would like to disable the second cell in the third row. How can I realise that? Thanks for any help I’ll get.

You can write addCellClickHandler on ListGrid. Please find code below.

grid.addCellClickHandler(new CellClickHandler() {
			
			@Override
			public void onCellClick(CellClickEvent event) {
				SC.say(event.getRowNum()+" "+event.getColNum();
			}
});

Override canEditCell().

@ skaluva: Thanks, but I like to disable the cell if I fill the Grid with data. I search for a possibility to disable a single cell without a handler.

@ davidj6: I tried it with ListGridRecord.setCanEdit(false) but than the whole column ist disabled but I like to disable a single cell.

Can you give me an example for @Override canEditCell() ? I’m a beginner in GWT.

Thanks that ist the solution.