is there an alternative to converting a 2-dimensional string array to a listgridrecord array instead of using a for loop like in the example below;
ArrayList<ListGridRecord> list = new ArrayList<>();
for (int i = 0; i < result[0].length; ++i) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("name", result[0][i]);
list.add(record);
}
ListGridRecord[] records = new ListGridRecord[list.size()];
list.toArray(records);
listGrid.setData(records);
ArrayList<ListGridRecord> list = new ArrayList<>();
for (int i = 0; i < result[0].length; ++i) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("name", result[0][i]);
list.add(record);
}
ListGridRecord[] records = new ListGridRecord[list.size()];
list.toArray(records);
listGrid.setData(records);