cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP MDK Data table Save

DeepthiChembeti
Discoverer
0 Likes
775

Hi All,

Created a Data Table and enabled the Inline edit for the entries.Can anyone help with restricting few columns for editing.

Also, How can the table data be posted on "Save" action?Any sample code should be great.

Thanks, Deepthi.

Accepted Solutions (0)

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Likes
The editable data table currently does not support restricting editing to only certain columns.  This has come up before and we are looking into adding it in a future release. I would suggest you to check for a feature request here and open a new request if there isn't one there already.  We'll review it based on its priority.

Regarding saving the changes you will need to use a rule on your save button to get the section and then call getChanges() to get the list of updated objects. 

 

const sectionedTable = context.getControl('SectionedTable');
const section = sectionedTable.getSection('DataTableSection');
let changedObjects = section.getChanges();​

 

 

You can then loop over the objects and call UpdateEntity for each one either independently or group them together in a ChangeSet.