display the result of a view in an editable grid

I am planning to display the result of a view in an editable grid . Can anyone please give me an example ? 

The number of rows is fixed but i dont want to write  a!gridRowLayout() 44 times as shown in the example of 2 rows

 

=load(
  local!items: {
    {item: "Item 1", qty: 1, unitPrice: 10},
    {item: "Item 2", qty: 2, unitPrice: 20}
  },
  a!gridLayout(
    label: "Grid Layout",
    instructions: "This is a grid layout",
    headerCells: {
      a!gridLayoutHeaderCell(label: "Item"),
      a!gridLayoutHeaderCell(label: "Qty", align: "RIGHT"),
      a!gridLayoutHeaderCell(label: "Unit Price", align: "RIGHT"),
      a!gridLayoutHeaderCell(label: "Total", align: "RIGHT")
    },
    rows: {
      a!gridRowLayout(
        contents: {
            a!textField(
            value: local!items[1].item,
            saveInto: local!items[1].item
          ),
          a!integerField(
            value: local!items[1].qty,
            saveInto: local!items[1].qty,
            align: "RIGHT"
          ),
          a!floatingPointField(
            value: local!items[1].unitPrice,
            saveInto: local!items[1].unitPrice,
            align: "RIGHT"
          ),
          a!textField(
            value: dollar(tointeger(local!items[1].qty) * todecimal(local!items[1].unitPrice)),
            readOnly: true,
            align: "RIGHT"
          )
        }
      ),
      a!gridRowLayout(
        contents: {
          a!textField(
            value: local!items[2].item,
            saveInto: local!items[2].item
          ),
          a!integerField(
            value: local!items[2].qty,
            saveInto: local!items[2].qty,
            align: "RIGHT"
          ),
          a!floatingPointField(
            value: local!items[2].unitPrice,
            saveInto: local!items[2].unitPrice,
            align: "RIGHT"
          ),
          a!textField(
            value: dollar(tointeger(local!items[2].qty) * todecimal(local!items[2].unitPrice)),
            readOnly: true,
            align: "RIGHT"
          )
        }
      )
    }
  )
)

  Discussion posts and replies are publicly visible