使用分页ObjectDataSource时DevExpress AspxGridView客户端SelectionChanged问题

发布于 2024-08-26 05:59:28 字数 1318 浏览 2 评论 0原文

上下文如下: 一个具有服务器端分页/过滤/排序机制的DexExpress AspxGridView(使用ObjectDataSource)。

我的过滤机制一直存在问题(请参阅此堆栈)。

现在,我遇到的问题是:客户端事件在数据源事件之间被破坏。 :哦。 让我解释一下会发生什么:如果我更改页面(或与此相关的排序/过滤器),然后从网格中选择一行,客户端 SelectionChanged 事件会很好地触发。如果我更改页面(或排序/过滤器),该事件将不再触发。相反,在服务器端,我收到“方法或操作未实现”异常,并显示以下堆栈跟踪:

    at DevExpress.Web.Data.WebDataProviderBase.GetListSouceRowValue(Int32 listSourceRowIndex, String fieldName)
   at DevExpress.Web.Data.WebDataProxy.GetListSourceRowValue(Int32 listSourceRowIndex, String fieldName)
   at DevExpress.Web.Data.WebDataProxy.GetKeyValueCore(Int32 index, GetKeyValueCallback getKeyValue)
   at DevExpress.Web.Data.WebDataSelectionBase.GetSelectedValues(String[] fieldNames, Int32 visibleStartIndex, Int32 visibleRowCountOnPage)
   at DevExpress.Web.Data.WebDataProxy.GetSelectedValues(String[] fieldNames)
   at DevExpress.Web.ASPxGridView.ASPxGridView.FBSelectFieldValues(String[] args)
   at DevExpress.Web.ASPxGridView.ASPxGridView.GetCallbackResultCore()
   at DevExpress.Web.ASPxGridView.ASPxGridView.GetCallbackResult()
   at DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.ICallbackEventHandler.GetCallbackResult()

我做错了什么吗?

任何帮助将不胜感激。

The context is as follows:
One DexExpress AspxGridView with a server-side paging/filtering/sorting mechanism (using ObjectDataSource).

I've been having problems with the filter mechanism ( see this stack ).

Now, the problem I'm having is this: the client-side events get mangled between DataSource events. :O .
Let me explain what happens: if I change the page (or sort/filter for that matter), then, select one row from the grid, the client-side SelectionChanged event fires well. If I change the page (or sort/filter), the event doesn't fire anymore. Instead, on the server side, I get a "The method or operation is not implemented" exception with the following stack-trace:

    at DevExpress.Web.Data.WebDataProviderBase.GetListSouceRowValue(Int32 listSourceRowIndex, String fieldName)
   at DevExpress.Web.Data.WebDataProxy.GetListSourceRowValue(Int32 listSourceRowIndex, String fieldName)
   at DevExpress.Web.Data.WebDataProxy.GetKeyValueCore(Int32 index, GetKeyValueCallback getKeyValue)
   at DevExpress.Web.Data.WebDataSelectionBase.GetSelectedValues(String[] fieldNames, Int32 visibleStartIndex, Int32 visibleRowCountOnPage)
   at DevExpress.Web.Data.WebDataProxy.GetSelectedValues(String[] fieldNames)
   at DevExpress.Web.ASPxGridView.ASPxGridView.FBSelectFieldValues(String[] args)
   at DevExpress.Web.ASPxGridView.ASPxGridView.GetCallbackResultCore()
   at DevExpress.Web.ASPxGridView.ASPxGridView.GetCallbackResult()
   at DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.ICallbackEventHandler.GetCallbackResult()

Am I doing something wrong?

Any help will be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不离久伴 2024-09-02 05:59:28

建议您避免使用 ObjectDataSource 并在代码隐藏中进行绑定。

您可以使用 ObjectDataSource 生成客户端代码,然后将其删除。

恕我直言,ObjectDataSource 和朋友都不是专业级的。

suggest you avoid ObjectDataSource and do your binding in the code-behind.

You can generate your client-side code using the ObjectDataSource, and then remove it.

IMHO, ObjectDataSource and friends are not professional grade.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文