ListGridRecord listGridRecord = new ListGridRecord();
listGridRecord.setAttribute(Endpoints.KEY_ENDPOINT, endpoint);
Record[] newRecords = new Record[records.length + 1];
newRecords[0] = listGridRecord;
System.arraycopy(records, 0, newRecords, 1, records.length);
endpointDataSource = new EndpointDataSource(this, newRecords);
if (Storage.isSupported()) {
// we have html5. add it to local storage as well so we keep
// it persistent between sessions
String endpointsJsonString = LocalStorageHelper.getEndpointsFromLocalStorage();