Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Converting a 2-dimensional string array to ListGridRecord[]

    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 &lt; 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);
    Last edited by gitere; 17 Oct 2017, 05:23.
Working...
X