The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Telerik datagrid Q3 / esDataSource

Last post 01-07-2008, 8:53 AM by sqrbox. 4 replies.
Sort Posts: Previous Next
  •  01-03-2008, 11:18 PM 7448

    Telerik datagrid Q3 / esDataSource

    Just installed the last Telerik Asp Controls 'Q3' Version which supports VS 2008.

    The configuration is simple, only the esDatasource Select event with the following:

    Code:
     protected void esDsXpVehicleBrand_esSelect(object sender, EntitySpaces.Web.esDataSourceSelectEventArgs e)
        {
            XpVehicleBrandCollection coll = new XpVehicleBrandCollection();
            coll.LoadAll();
            e.Collection = coll;
        }

    Binding the RadGrid to a esDatasource leads to the following exeption: 

     InnerException: Object reference not set to an instance of an object.
    FileName:
    FileLineNumber: 0
    FileColumnNumber: 0
    Method: EntitySpaces.Web.esDataSourceView.Select
    StackTrace:
    Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at EntitySpaces.Web.esDataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at Telerik.WebControls.GridTableView.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at Telerik.WebControls.GridTableView.DataBind() at Telerik.WebControls.RadGrid.DataBind() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

    Just wanted to check with you guys if this is a known problem before I make a help ticket at Teleriks.

    Thanks
     

  •  01-04-2008, 6:54 AM 7451 in reply to 7448

    Re: Telerik datagrid Q3 / esDataSource

    Do you have either AutoSorting or AutoPaging set to true on the esDataSource? My guess is this is not a Telerik Issue.

    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  01-04-2008, 7:42 AM 7452 in reply to 7451

    Re: Telerik datagrid Q3 / esDataSource

    Sorry Mike, whas on a deadline and couldnt get this to work.

    Build a complete new and empty project and now the new radGrid seems to work in combination with esDatasource.

    However in the existing project I still have this problem.

     I will dig a little deeper tonight.

    Thanks for the quick response.

     Kees.

  •  01-04-2008, 7:51 AM 7453 in reply to 7452

    Re: Telerik datagrid Q3 / esDataSource

    Cool, it has been our experience that the Telerik controls are usually dead on ...

    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  01-07-2008, 8:53 AM 7482 in reply to 7452

    Re: Telerik datagrid Q3 / esDataSource

    Don't know if this will help Keezebees situation, but I'm also using Telerik RadGrid Q3 and entityspaces. Although, I'm not using esDatasource, I bind the grid directly to the es collection through NeedDataSource event, and this is using SQL2000. In the previous version Q2 and earlier the autopaging and sorting works perfectly, bind it and it works, but not in the Q3 version.

    I suspect in Q3 telerik made internal changes to the radgrid that breaks the auto paging and sorting with entityspaces, this changes broke my project. After many days and support tickets, and trying to use esDataSource instead of databinding directly to the collection, the solution is to do this:

    TestTableCollection col = GetResources(SearchText);
    RGrid.DataSource = col.Query.LoadDataTable();

    Binding the datasource to datatable, not the best solution, but everything works fine now. However, now since the grid is binding to the datatable, any reference to GridDataItem.DataItem will be a  DataRowView, not an entityspace class object. Sad

    When I was contemplating to change my binding to esDataSource instead, I found out that with telerik grid I have to write custom paging and sorting and only works for SQL2005, too big of a change, don't have time to replace entire project to this method. Here is the telerik demo about custom paging: http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/CustomPaging/DefaultCS.aspx

    In summary for users of telerik radgrid, it's not the entityspaces issue, it's telerik's.


     


     


     

View as RSS news feed in XML