throw new NullPointerException(FrameworkLocale.messages().error_datasource_cant_be_null());
}
// check authorization
if (!AuthorizationProvider.isObjectAuthorized(dataSource)) {
throw new AccessViolationException(FrameworkLocale.messages().error_not_authorized());
}
if (dataGrid.getDataSource() == null) {
// Fake binding empty data for header rendering.
dataGrid.setDataSource(new IDataRow[0]);