如何将Sharepoint列列表绑定到下拉列表 [英] How to bind Column of Sharepoint list to dropdown

查看:101
本文介绍了如何将Sharepoint列列表绑定到下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将共享点列表列中的值绑定到下拉列表。我的下拉列表放在sharepoint designer中创建的表单上。

I want to bind values in column of share point list to the drop down. my drop down is placed on form created in sharepoint designer.

任何机构都可以建议我需要申请

can any body suggest me aproach i need to apply

推荐答案

您可以使用REST api检索列表项,然后通过jQuery / JavaScript绑定到下拉列表。

< span style ="margin:0px; color:#1f497d; font-family:'Times New Roman',serif; font-size:12pt">以下是供参考的示例代码。

<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript">


(function(){
//您要查询的列表,替换为您的自己的列表名称。
var listName ='Employee';
(function () { //the list which you want to query, replace with your own list name. var listName = 'Employee';


.ajax({
//在REST api下使用以检索所有列表项
url :_spPageContextInfo.webAbsoluteUrl +" / _ api / web / lists / getByTitle('" + listName +"')/ items?
.ajax({ // use below REST api to retrive all list items url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('" + listName + "')/items?


这篇关于如何将Sharepoint列列表绑定到下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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