Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

selections for editable grid in pagination

Certified Associate Developer

hi, 

I have implemented pagination for an editable grid, but when i select a first row and move to next page the selection remain same , though the row data is different

Page1 , i choose the first row

Page 2 - first row is automatically selected

how do I control the selection in pagination ,

local!listPagingInfo: a!pagingInfo(startIndex: 1, batchSize: 20),
local!pagedList: rule!getData(Id: local!search,pagingInfo: local!listPagingInfo)

a!gridLayout(

labelPosition: "ABOVE",
totalCount: null,
headerCells: {},
columnConfigs: {},
rows: {},

selectionValue: local!selectedIndex,
selectionSaveInto: {
a!save(
local!selectedIndex,
a!flatten(save!value)
),
a!save(
ri!selecteditems,
if(
a!isNullOrEmpty(local!selectedIndex),
{},
index(
local!pagedList,
local!selectedIndex
)
)
)

},
/*selectionRequired: true,*/
selectable: true,
selectionStyle: "CHECKBOX",
validations: {},
shadeAlternateRows: true,
borderStyle: "STANDARD",
rowHeader: 1
),

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to kowsalyavijayan

    I would just point you to the documentation pages for the editable grid.  I would suggest using the "id" functionality inside a!gridRowLayout(), and point it to a primary key instead of using the row's position.  Alas, I don't usually go through the painful process of manually building paging for editable grids, so my specific advice stops there.  But you seem to know how to manually manage saveInto parameters and so-forth, so I would warrant it won't be too difficult for you to rework.

Children
No Data