SharePoint模式对话框未显示在Visual Web部件上 [英] SharePoint Modal Dialog Not Showing On Visual Web Part

查看:48
本文介绍了SharePoint模式对话框未显示在Visual Web部件上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我在SharePoint 2013中创建了 Visual Web部件。 Web部件用于显示来自不同列表的列表数据。要在 Web部件上加载列表数据,我们使用了SPServices 。我们在$(document).ready函数下编写了代码,因此当Web部件加载时,数据将从列表中拉出并显示在屏幕上。对于加载列表数据,可能需要1-2分钟,所以我想显示SharePoint模式对话框(waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading ...','请等待数据从列表中获取)。 ..',76,330);)。这将向用户显示带有旋转图标的等待屏幕。所以用户将无法点击后台/页面。



但主要问题是,当我正在调用SharePoint模态对话框时,它没有显示在页面上,它隐藏在某处(从不同列表中提取数据时)。如果在调用SharePoint模式对话框后假设我使用过警报消息,则会突然显示SharePoint模态对话框。我对这种行为感到困惑。我应该如何解决这个问题,请指导我。



任何帮助都会很明显。



以下是代码,

Hello,

I have created a Visual Web part in SharePoint 2013. Web part is used for showing list data from different list. For loading list data on web part we have used SPServices. We have written code under $(document).ready function so when web part loads, data will pull from lists and displayed on the screen. For loading list data it may takes 1-2 minutes so I want to show SharePoint Modal dialog(waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...', 'Please wait while data is fetching from Lists...', 76, 330);). Which will show user the wait screen with spinning icon. So user will not be able to click on background/Page.

But main issue is that when I am calling SharePoint modal dialog it is not showing on page, it hides somewhere (when pulling data from different list). If suppose I have used alert message after calling SharePoint Modal dialog it shows the SharePoint Modal dialog suddenly. I am confused about this behavior. How should I sort out this issue please guide me.

Any help will be appreciable.

Below is the code,

$(document).ready(function () {        

    ExecuteOrDelayUntilScriptLoaded(function(){

            //For Opening Sharepoint Modal Dialog

            waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...', 'Please wait while data is fetching from Lists...', 76, 330);

           //Code which will get data from different list and show on web part using SPServices   



           //For Closing Sharepoint Modal Dialog           
           waitDialog .close(); 

    }, "sp.js");

});



谢谢,

Nitin


Thanks,
Nitin

推荐答案

(document).ready功能,当web部件加载时,数据将从列表中拉出并显示在屏幕上。对于加载列表数据,可能需要1-2分钟,所以我想显示SharePoint模式对话框(waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading ...','请等待数据从列表中获取)。 ..',76,330);)。这将向用户显示带有旋转图标的等待屏幕。所以用户将无法点击后台/页面。



但主要问题是,当我正在调用SharePoint模态对话框时,它没有显示在页面上,它隐藏在某处(从不同列表中提取数据时)。如果在调用SharePoint模式对话框后假设我使用过警报消息,则会突然显示SharePoint模态对话框。我对这种行为感到困惑。我应该如何解决这个问题,请指导我。



任何帮助都会很明显。



以下是代码,

(document).ready function so when web part loads, data will pull from lists and displayed on the screen. For loading list data it may takes 1-2 minutes so I want to show SharePoint Modal dialog(waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...', 'Please wait while data is fetching from Lists...', 76, 330);). Which will show user the wait screen with spinning icon. So user will not be able to click on background/Page.

But main issue is that when I am calling SharePoint modal dialog it is not showing on page, it hides somewhere (when pulling data from different list). If suppose I have used alert message after calling SharePoint Modal dialog it shows the SharePoint Modal dialog suddenly. I am confused about this behavior. How should I sort out this issue please guide me.

Any help will be appreciable.

Below is the code,


document )。ready(函数(){

ExecuteOrDelayUntilScriptLoaded( function (){

// 用于打开Sharepoint模态对话框

waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose(' 正在加载...'' 请等待从列表中获取数据...' 76 330 );

// 代码将获得da来自不同列表的ta并使用SPServices在Web部件上显示



// 用于关闭Sharepoint模态对话框
waitDialog .close();

}, sp.js);

});
(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(function(){ //For Opening Sharepoint Modal Dialog waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...', 'Please wait while data is fetching from Lists...', 76, 330); //Code which will get data from different list and show on web part using SPServices //For Closing Sharepoint Modal Dialog waitDialog .close(); }, "sp.js"); });



谢谢,

Nitin


Thanks,
Nitin


这篇关于SharePoint模式对话框未显示在Visual Web部件上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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