Ticket Q104692
Visible to All Users

ASPxGridview and LLBLGen Datasource Server Mode

created 17 years ago

Dear DevExpress:
We are evaluating the ASPxGridView as a possible solution fulfill the requirements of a grid heavy UI with our upcoming contract. We are very impressed with the capabilities of your gird. We do, however, work predominately with LLBLGen to support our data layer because it too is a powerful, best-in-class, ORM.
Naturally we would like the two of these technologies to work together in a way that will accommodate efficient use of resources. To us, this appears to be done using LinqServerModeDataSource, so that the ASPxGridview works in server mode.
Included as an attachment is an example solution. The file Default2.aspx is an attempt to get these two to work together, however we are experiencing an exception.
EXCEPTION DETAILS:
[InvalidCastException: Specified cast is not valid.]
   DevExpress.Data.Linq.LinqServerModeWebFrontEndOwner.Crash(Exception e) +6
   DevExpress.Data.Linq.Helpers.LinqServerModeCache.CrashLanding(Exception e) +46
   DevExpress.Data.Linq.Helpers.LinqServerModeCache.CreateTopGroupInfo() +623
   DevExpress.Data.Linq.Helpers.LinqServerModeWrapper.get_Count() +24
   DevExpress.Data.Linq.Helpers.LinqServerModeFrontEnd.get_Count() +33
   DevExpress.Data.Helpers.BaseDataControllerHelper.get_Count() +26
   DevExpress.Data.DataController.get_VisibleListSourceRowCount() +25
   DevExpress.Data.DataController.DoRefresh(Boolean useRowsKeeper) +161
   DevExpress.Data.DataController.EndUpdateCore(Boolean sortUpdate) +34
   DevExpress.Data.DataControllerBase.EndUpdate() +6
   DevExpress.Data.DataControllerBase.OnListSourceChanged() +122
   DevExpress.Data.DataControllerBase.SetListSourceCore(IList value) +40
   DevExpress.Data.DataControllerBase.SetListSource(IList value) +10
   DevExpress.Data.BaseListSourceDataController.SetDataSource(Object dataSource) +40
   DevExpress.Web.Data.WebDataControllerProvider.CreateDataController(Object dataSource) +339
   DevExpress.Web.Data.WebDataControllerProvider.SetDataSource(Object dataSource) +4
   DevExpress.Web.Data.WebDataProxy.SetDataSource(Object dataSource) +71
   DevExpress.Web.ASPxGridView.ASPxGridView.PerformDataBinding(String dataHelperName, IEnumerable data) +48
   DevExpress.Web.ASPxClasses.Internal.DataHelper.PerformDataBinding(IEnumerable data) +26
   DevExpress.Web.ASPxClasses.Internal.DataHelper.OnDataSourceViewSelectCallback(IEnumerable data) +90
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   DevExpress.Web.ASPxClasses.Internal.DataHelper.PerformSelect() +190
   DevExpress.Web.ASPxGridView.GridViewDataHelper.PerformSelect() +96
   DevExpress.Web.ASPxClasses.Internal.DataContainer.PerformSelect() +118
   DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBindCore() +15
   DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.DataBind() +147
   DevExpress.Web.ASPxClasses.Internal.DataHelperBase.EnsureDataBound(Boolean ensureChildControls) +89
   DevExpress.Web.ASPxClasses.Internal.DataContainer.EnsureDataBound() +128
   DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.OnPreRender(EventArgs e) +19
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Can you please help determine the cause of this problem. If we are able to coordinate the grid view in server mode using llblgen's ORM product, we will likely invest with DevExpress.
Thank you!

Show previous comments (4)
DevExpress Support Team 17 years ago

    Hi,
    Thank you for sending the code to us. We have researched the problem and think that this is an LLBLGenPro issue. Please send this project to Frans Bouma for investigation.
    Thanks,
    Plato

      Thanks… I've taken this up with Frans and we have been able to resolve some issues. However, it has been difficult to troubleshoot because the stack trace does not provide much information.
      Per Frans,
      "What DevExpress should do though is to propagate the inner exception's stacktrace to their output. The exception stacktrace that's now bubbled upwards is the stacktrace from the call to the crash wrapper, but that's not interesting, as the real exception and the real stacktrace is lost (it's not shown in the error page as you've seen).
      So they should set the inner exception of the exception they throw to the exception they catch from the code they're calling, so the exception and stacktrace which is the actual error is shown in the webpage and debugging is much easier, also for them, because it now looks as if it appears to be a bug inside their grid which isn't the case."
      Does this make sense?

      DevExpress Support Team 17 years ago

        Hi,
        As far as I know, we have implemented this in DXPerience 8.1.4.
        Thanks,
        Plato

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.