Editable Grid Pagination

Hi All

How To Write Pagination In Editable Grid ?Some Example

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    Yes we can add pagination to Editable Grid using 'Configurable Paging Info', available in AppMarket (https://community.appian.com/b/appmarket/posts/configurable-paging-info).

    Here is a sample code which i used

    load(
      local!items: {
        { item: "Item 1", qty: 1, unitPrice: 10 },
        { item: "Item 2", qty: 2, unitPrice: 20 },
        { item: "Item 3", qty: 3, unitPrice: 30 },
        { item: "Item 4", qty: 4, unitPrice: 40 },
        { item: "Item 5", qty: 5, unitPrice: 50 },
        { item: "Item 6", qty: 6, unitPrice: 60 },
        { item: "Item 7", qty: 7, unitPrice: 70 },
        { item: "Item 8", qty: 8, unitPrice: 80 },
        { item: "Item 9", qty: 9, unitPrice: 90 },
        { item: "Item 10", qty: 10, unitPrice: 100 },
        { item: "Item 11", qty: 11, unitPrice: 110 },
        { item: "Item 12", qty: 12, unitPrice: 120 },
        { item: "Item 13", qty: 13, unitPrice: 130 },
        { item: "Item 14", qty: 14, unitPrice: 140 },
        { item: "Item 15", qty: 15, unitPrice: 150 }
      },
      local!editableGridPagingInfo: a!pagingInfo(startIndex: 1, batchSize: 5),
      a!sectionLayout(
        label: "test",
        contents: {
          a!gridLayout(
            label: "Grid Layout test",
            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!forEach(
                items: todatasubset(
                  local!items,
                  local!editableGridPagingInfo
                ),
                expression: {
                  a!gridRowLayout(
                    contents: {
                      a!textField(
                        value: fv!item.item,
                        saveInto: fv!item.item
                      ),
                      a!integerField(
                        value: fv!item.qty,
                        saveInto: fv!item.qty,
                        align: "RIGHT"
                      ),
                      a!floatingPointField(
                        value: fv!item.unitPrice,
                        saveInto: fv!item.unitPrice,
                        align: "RIGHT"
                      ),
                      a!textField(
                        value: dollar(
                          tointeger(fv!item.qty) * todecimal(fv!item.unitPrice)
                        ),
                        readOnly: true,
                        align: "RIGHT"
                      )
                    }
                  )
                }
              )
            }
          ),
          rule!APN_configurablePagingInfo(
            pagingInfo: local!editableGridPagingInfo,
            totalCount: length(local!items),
            showWhen: true()
          )
        }
      )
    )

  • 0
    Certified Associate Developer
    in reply to sureshk

    The APN_configurablePagingInfo is not working, do you have any other workaround, please?

Reply Children
No Data