if (tableInfo != null) {
boolean lengthIsKnown = false;
if (listGrid != null) {
ResultSet results = listGrid.getResultSet();
if (results != null) {
Boolean flag = results.lengthIsKnown();
if (flag != null) {
lengthIsKnown = flag.booleanValue();
}
} else {
lengthIsKnown = (listGrid.getDataSource() == null); // not bound by a datasource, assume we know