如何使用JavaScript将sharepoint 2013 rest api数据呈现到列表/库视图中? [英] How to render sharepoint 2013 rest api data into a list/library view with javascript?

查看:68
本文介绍了如何使用JavaScript将sharepoint 2013 rest api数据呈现到列表/库视图中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谢谢

解决方案

您可以将json数据绑定到jQuery dataTable,它看起来像SharePoint列表视图.

 


(document).ready(function(){ loadMyItems(); }); 函数loadMyItems(){ var siteUrl = _spPageContextInfo.siteAbsoluteUrl; var oDataUrl = siteUrl +"/_api/web/lists/getbytitle('Employee')/items?


select =名称,位置,办公室,年龄,StartDate,薪水"> /blockquote>

am downloading data from a sharepoint 2013 library and custom list, using the rest API (with CAML query), and I get back JSON data. Is there a javascript library out there that can take that JSON data and render it into a listview control, such that it would look exactly like, if I literally put a list/library webpart onto the page (out of the box style)?

Thanks

解决方案

Hi,

You could bind json data to jQuery dataTable and it looks like SharePoint list view.


(document).ready(function() { loadMyItems(); }); function loadMyItems() { var siteUrl = _spPageContextInfo.siteAbsoluteUrl; var oDataUrl = siteUrl + "/_api/web/lists/getbytitle('Employee')/items?


select=Name,Position,Office,Age,StartDate,Salary";


这篇关于如何使用JavaScript将sharepoint 2013 rest api数据呈现到列表/库视图中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆