Expected behaviour: If i selected one row in editable grid then it should deselect all other rows except selected row ,
Actual behaviour: It is deselecting all remaining row whenever Iam selecting any row in editable grid,
a!localVariables( local!selectionIndex:tointeger({}), local!data:{ {id:1,name:"Pavani"}, {id:2,name:"Sravani"}, {id:3,name:"Srani"}, {id:4,name:"Sri"}, }, a!gridLayout( headerCells: { a!gridLayoutHeaderCell( label: "Id" ) }, rows:a!forEach( items: local!data, expression: { a!gridRowLayout( id: fv!index, selectionDisabled: if(a!isNullOrEmpty(local!selectionIndex),{}, if(count(local!selectionIndex)=fv!itemCount,false(),true())), contents:a!integerField( label: "Id", value: fv!item.id, saveInto: fv!item.id ), ), } ), selectable: true(), rowHeader: 1, selectionValue: local!selectionIndex, selectionSaveInto: a!save( local!selectionIndex, save!value ) ) )
Discussion posts and replies are publicly visible
Stefan Helzle already provided a solution for the Editable grid.
However, If you are not doing inline editing in the grid, go with the Read-Only Grid. It has a configuration parameter to control max selection (maxSelections).
selectable: true, maxSelections: 1, selectionValue: local!selection, selectionSaveInto: local!selection