Drop down Pagination

is it possible to used a dropdown pagination in a read-only grid table(recordType)? please see the attached image for the sample output. thank you

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    yes it is possible to use a dropdown's value to control grid's paging, for refrence4 -> 

    a!localVariables(
      local!defaultPaging: 5,
      local!allowedPaging: { 5, 10, 15, 20 },
      local!data: {
        { id: 1, name: "aman" },
        { id: 2, name: "john" },
        { id: 3, name: "sara" },
        { id: 4, name: "alex" },
        { id: 5, name: "emma" },
        { id: 6, name: "david" },
        { id: 7, name: "lisa" },
        { id: 8, name: "michael" },
        { id: 9, name: "olivia" },
        { id: 10, name: "chris" },
        { id: 11, name: "jessica" },
        { id: 12, name: "ryan" },
        { id: 13, name: "emily" },
        { id: 14, name: "brandon" },
        { id: 15, name: "amy" },
        { id: 16, name: "peter" },
        { id: 17, name: "natalie" },
        { id: 18, name: "kevin" },
        { id: 19, name: "hannah" },
        { id: 20, name: "adam" }
      },
      {
        /*pagsize to be controlled */
        a!dropdownField(
          choiceLabels: local!allowedPaging,
          choiceValues: local!allowedPaging,
          label: "Page Size",
          labelPosition: "ABOVE",
          value: local!defaultPaging,
          saveInto: { local!defaultPaging },
          searchDisplay: "AUTO",
          validations: {}
        ),
        a!gridField(
          label: "Read-only Grid",
          labelPosition: "ABOVE",
          data: local!data,
          columns: {
            a!gridColumn(label: "id", value: fv!row.id),
            a!gridColumn(label: "name", value: fv!row.name)
          },
          /*pagsize to be applied*/
          pageSize: local!defaultPaging,
          validations: {}
        )
      }
    )

Reply
  • 0
    Certified Associate Developer

    yes it is possible to use a dropdown's value to control grid's paging, for refrence4 -> 

    a!localVariables(
      local!defaultPaging: 5,
      local!allowedPaging: { 5, 10, 15, 20 },
      local!data: {
        { id: 1, name: "aman" },
        { id: 2, name: "john" },
        { id: 3, name: "sara" },
        { id: 4, name: "alex" },
        { id: 5, name: "emma" },
        { id: 6, name: "david" },
        { id: 7, name: "lisa" },
        { id: 8, name: "michael" },
        { id: 9, name: "olivia" },
        { id: 10, name: "chris" },
        { id: 11, name: "jessica" },
        { id: 12, name: "ryan" },
        { id: 13, name: "emily" },
        { id: 14, name: "brandon" },
        { id: 15, name: "amy" },
        { id: 16, name: "peter" },
        { id: 17, name: "natalie" },
        { id: 18, name: "kevin" },
        { id: 19, name: "hannah" },
        { id: 20, name: "adam" }
      },
      {
        /*pagsize to be controlled */
        a!dropdownField(
          choiceLabels: local!allowedPaging,
          choiceValues: local!allowedPaging,
          label: "Page Size",
          labelPosition: "ABOVE",
          value: local!defaultPaging,
          saveInto: { local!defaultPaging },
          searchDisplay: "AUTO",
          validations: {}
        ),
        a!gridField(
          label: "Read-only Grid",
          labelPosition: "ABOVE",
          data: local!data,
          columns: {
            a!gridColumn(label: "id", value: fv!row.id),
            a!gridColumn(label: "name", value: fv!row.name)
          },
          /*pagsize to be applied*/
          pageSize: local!defaultPaging,
          validations: {}
        )
      }
    )

Children
No Data