I have a grid (in SAIL) that displays a number of rows. When one row is selected, the details for that row are displayed below. Any edits the user makes to the details need to flow back to the grid and be displayed. This grid is not tied to a record set, but CDT data obtained from other parts of my application. NOTE: An editable grid will not work for my scenario.
A greatly simplified version of my need is....
a!localVariables( local!data: { { name: "Springs", qty: 4, unitCost: 1.27 }, { name: "Sprockets", qty: 1, unitCost: 2.50 }, { name: "Gears", qty: 7, unitCost: 1.98 } }, local!selection: null, { a!sectionLayout( label: "Order Summary", contents: a!gridField( data: local!data, columns: { a!gridColumn(label: "Qty", value: fv!row.qty), a!gridColumn(label: "Item Name", value: fv!row.name), a!gridColumn(label: "Unit Cost", value: fv!row.unitCost), a!gridColumn(label: "Line Total", value: fv!row.qty * fv!row.unitCost) }, selectable: true, selectionstyle: "ROW_HIGHLIGHT", selectionSaveInto: { a!save( local!selection, index(fv!selectedRows, length(fv!selectedRows), null) ) } ) ), a!sectionLayout( label: "Line Item Detail", contents: { a!textField( label: "Item Name", value: local!selection.name, saveInto: local!selection.name ), a!textField( label: "Quantity", value: local!selection.qty, saveInto: local!selection.qty ), a!textField( label: "Unit Cost", value: local!selection.unitCost, saveInto: local!selection.unitCost ) }, showWhen: not(isnull(local!selection)) ) } )
When the data is changed, I see the update in local!selection but how do I get that change back to the grid data source (local!data)?
Discussion posts and replies are publicly visible