Asp 更新面板 - GridView 底层的详细信息视图更新不会
我在页面上有一个 Asp.net gridview,当单击按钮字段(而不是选择)时,它会打开一个弹出表单(我的弹出窗口不是 asp 的),其中包含显示在可编辑的 DetailsView 中的 gridview 行的详细信息。 (使用这种方法是因为网格包含 20 个较宽的列,并且以详细信息视图格式更容易编辑/更新)详细信息视图接受任何修改并将它们写回到表中,很好,但底层的 Gridview 永远不会在视觉上更新,除非当然,页面已完全重新加载(我尝试使用 Windows.reload 函数,但我得到了烦人的 Windows 正在尝试重新打开等错误,因此这是无用的)。我试图找到让 gridview 刷新其数据的最佳方法。我已经通过 Me.ClientScript.RegisterStartupScript(Me.GetType() eyc)放置了一个警报框,以便在详细信息视图的“更新步骤”触发时进行通信,以便我可以插入 gridview.ReBind() 但因为详细信息视图保存在更新面板,例如,Protected Sub DetailsView2_ItemUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewUpdatedEventArgs) 处理DetailsView2.ItemUpdated 函数,而 roqwupdatind 等函数似乎不会触发(。当然,他们必须这样做,否则表格将不会更新。我的问题是如何与包含详细信息视图的面板中的更新事件进行通信,以便我可以在主网格视图上进行重新绑定,谢谢。你
I have an Asp.net gridview on a page, when a buttonfield is clicked (instead of select) it opens a popup form (my popup not asp's) which contains the detail of the gridview row displayed in an editable DetailsView. (This approach has been used because the grid contains 20 wideish columns and it is easier to edit / update in the detailsView format) The DetailsView takes any amendmends and writes them back to the table, fine, but the underlying Gridview is never visually updated unless of course the page is completely reloaded (I tried to use the Windows.reload function but I get the annoying winddows is trying to reopen etc, error, so that is useless). I am trying to discover the best way to get the gridview to refresh it's data. I have placed via a Me.ClientScript.RegisterStartupScript(Me.GetType() eyc, an alert box to communicate when the 'update steps' of the detailsview fires so I could interject a gridview.ReBind() but because the detailsview is held within the update panel the, for example, Protected Sub DetailsView2_ItemUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewUpdatedEventArgs) Handles DetailsView2.ItemUpdated functions, and the roqwupdatind and so one, do not appear to fire. (they must do of course else the table would not be updating. MY problem is how do I 'communicate with update events within the panel contained detailsviews so that I can cause a reBind to occur on the main gridview. Any Ideas would be appreciated. Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
详细视图有一个名为的事件
,其中 dvEbook 是我的详细视图。
它将调用同一页面。
我希望它对你有用。
谢谢
Detail view have an event called
where dvEbook is my detail view.
It will call a same page.
I hope it will work for you.
Thanks