Using SP out of box Edit icon with Data Tables
Hello,
I am able to use Data tables within my SP forms which is a great enhancement to my forms. But is there a way to bring in the SharePoint out of box "Edit" icon on the data tables view?
Here is the js code.
<script>
$(document).ready(function() {
$('#requests').DataTable({
'ajax': {
'url': "myurl/items?$select=Title,City,Classification,PositionTitle,TA%5Fx002d%5FID2,Update,Edit/Id,Edit/Title&expand=Edit&$filter=(Classification eq 'Pooled')&$top=1000",
'headers': { 'Accept': 'application/json;odata=nometadata' },
'dataSrc': function(data) {
return data.value.map(function(item) {
return [
item.Title,
item.City,
item.Classification,
item.TA_x002d_ID2,
item.PositionTitle,
item.Update,
item.Edit
];
});
}
}
});
});
</script>
Thank you for your help.
Joe
I am able to use Data tables within my SP forms which is a great enhancement to my forms. But is there a way to bring in the SharePoint out of box "Edit" icon on the data tables view?
Here is the js code.
<script>
$(document).ready(function() {
$('#requests').DataTable({
'ajax': {
'url': "myurl/items?$select=Title,City,Classification,PositionTitle,TA%5Fx002d%5FID2,Update,Edit/Id,Edit/Title&expand=Edit&$filter=(Classification eq 'Pooled')&$top=1000",
'headers': { 'Accept': 'application/json;odata=nometadata' },
'dataSrc': function(data) {
return data.value.map(function(item) {
return [
item.Title,
item.City,
item.Classification,
item.TA_x002d_ID2,
item.PositionTitle,
item.Update,
item.Edit
];
});
}
}
});
});
</script>
Thank you for your help.
Joe
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Joe,
Can you send us a screenshot of what you mean? For example, what you have and what you want - that will help.
If we are talking about our Forms product and its Data Table control, we have a dedicated community for it here - https://community.plumsail.com/c/forms
It's okay, we can still answer here even if it is about Forms - it's just for the future!
Can you send us a screenshot of what you mean? For example, what you have and what you want - that will help.
If we are talking about our Forms product and its Data Table control, we have a dedicated community for it here - https://community.plumsail.com/c/forms
It's okay, we can still answer here even if it is about Forms - it's just for the future!
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Joe,
I'm not sure that I recognize the DataTable, the one that we have is slightly different. Can you show me a screenshot of the editor? Preferably, not cut to the same extent, so we can see more on it.
I'm not sure that I recognize the DataTable, the one that we have is slightly different. Can you show me a screenshot of the editor? Preferably, not cut to the same extent, so we can see more on it.
Cheers
Hello Nikita,
Related Items shows how display fields including the SharePoint out of box, "Edit" icon.
DataTables pic show how DataTables.net js can interpret fields but it cannot display the SharePoint out of box, "Edit" icon.
The code above shows the js that I am using to show the fields in DataTables but it is missing the SharePoint out of box "Edit icon.
What I am needing to do is to open the links in Dialog mode.
Any help you can provide will be greatly appreciated.
Thank you,
Joe
Related Items shows how display fields including the SharePoint out of box, "Edit" icon.
DataTables pic show how DataTables.net js can interpret fields but it cannot display the SharePoint out of box, "Edit" icon.
The code above shows the js that I am using to show the fields in DataTables but it is missing the SharePoint out of box "Edit icon.
What I am needing to do is to open the links in Dialog mode.
Any help you can provide will be greatly appreciated.
Thank you,
Joe
- Attachments
-
- datatablesimage.PNG (85.86 KiB) Viewed 1809 times
-
- RelatedItem1.PNG (133.03 KiB) Viewed 1809 times
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Joe,
Unfortunately, can't help here as I really wouldn't know what the best way is. While we are product that our products are compatible with other solutions and you can use any that you see fit, we can't offer support to the questions which are not related to our core product - we simply lack the knowledge of the product. Related Items use default SharePoint views, that's why they look so similar to default lists.
I can only recommend to open the dev tools in the browser, including the inspector and compare Related Items to this product directly on the form. Most likely you would be able to use some JavaScript to achieve similar effect, though we can't guarantee.
Unfortunately, can't help here as I really wouldn't know what the best way is. While we are product that our products are compatible with other solutions and you can use any that you see fit, we can't offer support to the questions which are not related to our core product - we simply lack the knowledge of the product. Related Items use default SharePoint views, that's why they look so similar to default lists.
I can only recommend to open the dev tools in the browser, including the inspector and compare Related Items to this product directly on the form. Most likely you would be able to use some JavaScript to achieve similar effect, though we can't guarantee.
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests