I have a list grid and I will it with data from database. User cannot edit it. I would like to mark some rows with error icons. I found SmartGWT has validation feature, but I didn't find any example using it without having user input. In my case, code itself should mark errors for specific rows. I tried setFieldError, CustomValidator and some others..
Here's my code:
Here's my code:
Code:
listGridStatements = new ListGrid(); ListGridField listGridFieldStatementsStatement = new ListGridField("Statement", "Statement"); ListGridField listGridFieldStatementsPosition = new ListGridField("Position", "Position"); listGridStatements.setFields(new ListGridField[] { listGridFieldStatementsStatement, listGridFieldStatementsPosition}); addChild(listGridStatements); StatementResultRecord record1 = new StatementResultRecord("test", 1); StatementResultRecord record2 = new StatementResultRecord("second one", 2); listGridStatements.setData(new StatementResultRecord[] { record1, record2 }); listGridStatements.setFieldError(1, "Statement", "I would like to see this error right now, but I can't :(");
Comment