ModalDialog 关闭时 ASP GridView 自动更新
我有一个带有搜索和过滤选项的 gridView,它列出了 SharePoint 库中的文档,当我单击文档名称时,我添加了一个模态弹出窗口来显示文档属性页面,例如,如果我更新文档的标题并选择保存,则该项目为已更新,但 gridview 仍然显示旧标题,我需要再次按“搜索”才能刷新值。
我用于模型弹出窗口的代码是:
<script type="text/javascript">
function openModal(url) {
var options = SP.UI.$create_DialogOptions();
options.url = url;
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);
}
// Dialog callback
function CloseCallback(result, target) {
if (result === SP.UI.DialogResult.OK) {
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}
}
</script>
当弹出窗口关闭时,我应该如何刷新和出价 gridview 数据?
I have a gridView with search and filtering options, it is listing document from SharePoint Library, when i click on the Document name i added a Modal popup to display Documents properties page, if i update Document's title for example and select save, the item is updated but the gridview is still showing the old title, i need to press Search again in order to refresh the values.
the code i use for model popup is:
<script type="text/javascript">
function openModal(url) {
var options = SP.UI.$create_DialogOptions();
options.url = url;
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);
}
// Dialog callback
function CloseCallback(result, target) {
if (result === SP.UI.DialogResult.OK) {
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}
}
</script>
what should i do to refresh and bid gridview data when the popup is closed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
单击“保存”按钮时,进行服务器端调用以重新绑定网格视图。 ie
然而,对于 asp.net,如果您使用 asp.net 附带的
modalPopupExtender
,这些事情就会变得不那么容易on the click of
save
button, make a serverside call to rebind the gridview. i.eHowever with asp.net these things become little easy if you use
modalPopupExtender
that ships with asp.net您好,使用 javascript 处理共享点保存事件,您可以使用此函数
Hi for handling sharepoint save event using javascript u can use this function