使用分页ObjectDataSource时DevExpress AspxGridView客户端SelectionChanged问题
上下文如下: 一个具有服务器端分页/过滤/排序机制的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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
建议您避免使用 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.