DevExpress AspxGridView clientside SelectionChanged problem when using paged ObjectDataSource
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.
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.
精彩评论