Skip to main content
January 20, 2021
Question

How to remove pagination in editable grid

  • January 20, 2021
  • 7 replies
  • 1 view



load(
  local!carriers: rule!CAS_getPayeesAndCarriers(
    getOnlyCarriers: true
  ),
  a!gridField_19r1(
  totalCount: ri!processData.totalCount,
  columns: {
    a!gridTextColumn(
      label: "Last Updated",
      field: "c12",
      data: a!forEach(
        items: index(ri!processData.data, "c12", {}),
        expression: todate(fv!item)
      )
    ),
    a!gridTextColumn(
      label: "Assignee",
      field: "c13",
      data: a!forEach(
        items: index(ri!processData.data, "c13", {}),
        expression: if(
          isusernametaken(tostring(index(fv!item, 2, null))),
          rule!CAS_formatUserName(userName: index(fv!item, 2, null)),
          null
          
        )
      )
    ),
    a!gridTextColumn(
      label: "Carrier Policy ID",
      field: "c6",
      data: index(ri!processData.data, "c6", {}),
      links: a!forEach(
        items: index(ri!processData.data, "c5", {}),
        expression: a!processTaskLink(
          task: fv!item
        )
      )
    )
    ,
    a!gridTextColumn(
      label: "Policy Status",
      field: "c11",
      data: a!forEach(
        items: ri!processData.data,
        expression: concat(
          rule!CAS_getReferenceValueByRefId(
            refData: ri!refData,
            referenceId: index(fv!item, "c11", null)
          )
        )
      )
    ),
    a!gridTextColumn(
      label: "Workflow Status",
      field: "c7",
      data: a!forEach(
        items: ri!processData.data,
        expression: rule!CAS_getReferenceValueByRefId(
            refData: ri!refData,
            referenceId: index(fv!item, "c7", null)
          )
      )
    ),
    a!gridTextColumn(
      label: "Customer",
      field: "c10",
      data: index(ri!processData.data, "c10", {})
    ),
    a!gridTextColumn(
      label: "Carrier",
      field: "c8",
      data: a!forEach(
        items: index(ri!processData.data, "c8", {}),
        expression: index(rule!GBL_filterCdtByFieldSingleValue(
          cdt: local!carriers,
          field: "id",
          value: fv!item
        ), "name", null)
      )
    ),
    a!gridTextColumn(
      label: "Coverage Code",
      field: "c9",
      data: a!forEach(
        items: index(ri!processData.data, "c9", {}),
        expression: rule!CAS_getReferenceValueByRefId(
          refData: ri!refData,
          referenceId: fv!item
        )
      )
    )
  },
  value: ri!pagingInfo
)
)

Just want to check if there's any way to remove or hide the pagination in a!gridField_19r1 function. See code. Thanks!

    7 replies

    mikes0011
    Brainy
    January 20, 2021

    FYI, that's not "editable grid", it's "paging grid" aka "read-only grid" (both of these refer to the same thing).  Editable Grid is a!gridLayout().

    To get rid of pagination in the paging grid, the only real option is to load the entire data set and display it all at once.  There's no real limit to the size you can show, though the functional limit means you start really impacting performance with as few as maybe a hundred or so rows, depending on other parameters (number of columns, complexity, etc).

    As an aside: I personally recommend migrating all instances of a!gridField_19r1 to the newer paging grid, because it works more easily in most cases and is far more flexible, including allowing use of rich text display within columns (which opens up a wealth of new capabilities, including using rich text links and icons, etc).

    The Expression Guru
    January 20, 2021

    Thanks Mike for the information! Is there a link that can be followed for the newer paging grid? Also, what is your recommendation if will be adding the first (<<) and last (>>) page scroll on the pagination with the code inserted.

    mikes0011
    Brainy
    January 20, 2021

    The general documentation on the general paging grid component is found here.

    For your second question I'm unclear what you're asking - are you asking how to add the << and >> scroll controls, or something else?

    The Expression Guru