Dynamically Hide Column in Related-Item
Thank you
Another question : How can I set max column width this column? I changed column's value but it seems like they have been overlaped. How can I set auto-fix?
Another question : How can I set max column width this column? I changed column's value but it seems like they have been overlaped. How can I set auto-fix?
Code: Select all
$('.RelatedItem a.ms-headerSortTitleLink')[index].text = item[0].Column1;
ksertkaya,
You can set the width of the columns with the CSS.
For all columns please use this CSS:
And if you want to change the width of a specific column only, use this CSS:
Note that you should replace '5' with an index of the column that you want to format.
You can set the width of the columns with the CSS.
For all columns please use this CSS:
Code: Select all
.ms-viewheadertr th {
width: 350px;
}
Code: Select all
.ms-viewheadertr th:nth-child(5) {
width: 350px;
}
Hello ksertkaya,
The CSS classes of the column headers are different for a standard and quick edit views.
To change the column header in a quick edit view, please use the following code.
The CSS classes of the column headers are different for a standard and quick edit views.
To change the column header in a quick edit view, please use the following code.
Code: Select all
$('.ms-spGrid-HeaderContentStyle')[0].innerText = 'New Title';
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Sertkaya,
Unfortunately, that's not possible, at least as far as I am aware. Maybe if you use Calculated column, then it could work.
The issue is that Related Items is just a regular SharePoint List view, there are no extra tools in our JS API for it. If there are solutions which work in Quick Edit mode in regular SharePoint lists, then they might work here as well.
P.S. Workflow might work, but you'll need to refresh Related Items manually, and it''s impossible to say when Workflow is ready.
You can use the following JS to refresh Related Items:
Unfortunately, that's not possible, at least as far as I am aware. Maybe if you use Calculated column, then it could work.
The issue is that Related Items is just a regular SharePoint List view, there are no extra tools in our JS API for it. If there are solutions which work in Quick Edit mode in regular SharePoint lists, then they might work here as well.
P.S. Workflow might work, but you'll need to refresh Related Items manually, and it''s impossible to say when Workflow is ready.
You can use the following JS to refresh Related Items:
Code: Select all
fd.relatedItems(0).data('ctx').clvp.RefreshPagingEx('');
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests