使用更新面板时,gridview不可见

gridview is not visible when using update pannel
2020-11-21
  •  译文(汉语)
  •  原文(英语)

这是要加载的模式页面.

<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gridetails" runat="server" 

  ..... </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gridetails" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

以这种模态形式

 $(document).on("click", "#Loadqty_detl", function () {
       var dlg1=  $('<div id=DialogDiv>').dialog({
           height: $(document).height() - 100,
           width: $(document).width() - 100,
           appendTo:"form",
           closeOnEscape: true,
           autoOpen: false,
           modal: true,
           title: "Entry form",
           open: function () {
               $(this).load('Ord_Quantitydetl.aspx');
           },
           show: {
               effect: "blind",
               duration: 500
           },
           hide: {
               effect: "clip",
               duration: 1000
           },
           buttons: {
               Close: function () {
                   $(this).dialog("close");
               }
           }
       });

       var reload = dlg1.dialog("open");
       Sys.Application.add_init(reload);

   });

但是,只要取消对scripmanager或updatepannel的注释,就不会加载此gridview,因为显示了空白modalpopup.

解决过程1

添加updatepannel和scriptmanager后,在develooper工具或firebird解决这些错误后,我遇到了错误.

this is the modal page to be loaded.

<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gridetails" runat="server" 

  ..... </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gridetails" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

in this modal form

 $(document).on("click", "#Loadqty_detl", function () {
       var dlg1=  $('<div id=DialogDiv>').dialog({
           height: $(document).height() - 100,
           width: $(document).width() - 100,
           appendTo:"form",
           closeOnEscape: true,
           autoOpen: false,
           modal: true,
           title: "Entry form",
           open: function () {
               $(this).load('Ord_Quantitydetl.aspx');
           },
           show: {
               effect: "blind",
               duration: 500
           },
           hide: {
               effect: "clip",
               duration: 1000
           },
           buttons: {
               Close: function () {
                   $(this).dialog("close");
               }
           }
       });

       var reload = dlg1.dialog("open");
       Sys.Application.add_init(reload);

   });

but as long as scripmanager or updatepannel is uncommented this gridview is not loaded as aresult blank modalpopup is shown.

Solutions1

i had errors after adding updatepannel and scriptmanager resolving those errors by develooper tool or firebird does the job/.

转载于:https://stackoverflow.com/questions/28361504/gridview-is-not-visible-when-using-update-pannel

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入