Completed
Last Updated: 03 Nov 2014 09:55 by Elena
Chris Ramey
Created on: 29 May 2013 17:18
Category: Grid
Type: Bug Report
0
FIX RadGrid Model Binding Design-time Error when SelectMethod property added
Design-time error when SelectMethod property added.

aspx
    <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server"
            AllowSorting="True"  PageSize="10" AllowMultiRowEdit="False"
            ItemType="ContosoUniversity.Models.Student" DataKeyNames="StudentID" 
            SelectMethod="GetStudentData"
            >                    
    </telerik:RadGrid>

code-behind:
        public IQueryable<Student> GetStudentData([Control] AcademicYear? displayYear)
        { .....

ERROR:
RadGrid - RadGrid1System.ArgumentException: source is not IEnumerable<> 
		at System.Linq.Queryable.AsQueryable(IEnumerable source) 
		at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) 
		at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) 
		at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) 
		at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) 
		at System.Web.UI.WebControls.DataBoundControl.PerformSelect() 
		at Telerik.Web.UI.GridTableView.PerformSelect() 
		at Telerik.Web.UI.GridTableView.DataBind() 
		at Telerik.Web.UI.RadGrid.DataBind() 
		at System.Web.UI.Design.WebControls.DataBoundControlDesigner.DataBind(BaseDataBoundControl dataBoundControl) 
		at Telerik.Web.Design.RadGridDesigner.DataBind(BaseDataBoundControl dataBoundControl) 
		at System.Web.UI.Design.WebControls.BaseDataBoundControlDesigner.GetDesignTimeHtml()
1 comment
Elena
Posted on: 03 Nov 2014 09:55
Not reproducible in Q3 2014.