Selected Items in Related-items
Hi!
I'm sorry for a late reply.
First of all, you should assign the custom CSS class to the Related Items control e.g. related-items. Then you can add a button to the form and add this code to the OnClick property of the button:
Notice that you should replace "Title" with the displayed name of the column you want to be saved in the array.
I'm sorry for a late reply.
First of all, you should assign the custom CSS class to the Related Items control e.g. related-items. Then you can add a button to the form and add this code to the OnClick property of the button:
Code: Select all
var index = $(".related-items").find('th:contains("Title")').index() + 2;
var array = $(".related-items").find('table tr > td:nth-child('+index+')[style*="background-color: rgb(199, 224, 244);"], table tr > td:nth-child('+index+').ms-jsgrid-cell-selected-editable').find('a.ms-listlink');
var textArray=[];
for (var i=0;i < array.length; i++ ){
textArray.push(array[i].text)
}
console.log(textArray);
-
- Posts: 21
- Joined: Sun Feb 24, 2019
Using the code above I get the Index returned for the column I want but the Array length is still 0? What am I doing wrong.
My goal is to allow a user to Quick Edit the related items and select 1 row. I need 1 column from the selected row only.
Thanks in advance
My goal is to allow a user to Quick Edit the related items and select 1 row. I need 1 column from the selected row only.
Thanks in advance
-
- Information
-
Who is online
Users browsing this forum: No registered users and 13 guests