In a Interface I want to show a Paging Grid with multiple columns and multiple r

In a Interface I want to show a Paging Grid with multiple columns and multiple rows(data should fetch from database). Now I have to select some of the records from the grid and on clicking on a button/image, the selected records should move into another Grid(assume Grid2) in the same Interface. Can any one provide the code.

OriginalPostID-149370

OriginalPostID-149370

  Discussion posts and replies are publicly visible

Parents
  • @clarke. In the sample code, it throws an error.
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "m_id",
    ascending: false
    )
    ),
    with(
    local!data:rule!sampleTable_db(),
    local!datasubset:todatasubset(local!data,local!pagingInfo),
    a!gridField(
    totalCount: local!datasubset.totalCount,
    columns: {
    a!gridTextColumn(
    label: "ID",
    field: "m_id",
    data: index(local!datasubset.data, "m_id", null)
    ),
    a!gridTextColumn(
    label: "Name",
    field: "name",
    data: index(local!datasubset.data, "name", null)
    ),
    a!gridTextColumn(
    label: "Number",
    field: "number",
    data: index(local!datasubset.data, "number", null)
    )
    },
    value: local!pagingInfo
    )
    )
    )

    Error ("Expression evaluation error at function a!formLayout: Error evaluating function 'todatasubset' : [Ljava.lang.Object; cannot be cast to com.appiancorp.suiteapi.common.paging.DataSubset").
Reply
  • @clarke. In the sample code, it throws an error.
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "m_id",
    ascending: false
    )
    ),
    with(
    local!data:rule!sampleTable_db(),
    local!datasubset:todatasubset(local!data,local!pagingInfo),
    a!gridField(
    totalCount: local!datasubset.totalCount,
    columns: {
    a!gridTextColumn(
    label: "ID",
    field: "m_id",
    data: index(local!datasubset.data, "m_id", null)
    ),
    a!gridTextColumn(
    label: "Name",
    field: "name",
    data: index(local!datasubset.data, "name", null)
    ),
    a!gridTextColumn(
    label: "Number",
    field: "number",
    data: index(local!datasubset.data, "number", null)
    )
    },
    value: local!pagingInfo
    )
    )
    )

    Error ("Expression evaluation error at function a!formLayout: Error evaluating function 'todatasubset' : [Ljava.lang.Object; cannot be cast to com.appiancorp.suiteapi.common.paging.DataSubset").
Children
No Data