Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > .NET Framework 3.5
.NET Framework 3.5 For discussion of the Microsoft .NET Framework 3.5.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 3.5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 11th, 2008, 04:41 AM
Registered User
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prakashbpl
Default Binding IEnumerable result set of a LINQ query

When binding IEnumerable result set of a LINQ query to a nested grid getting ERROR:
NotSupportedException : The data source does not support server-side data paging;
Details are below

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  IList<Products> listpdt = (IList < Products >) Session["Product"];
  if (e.Row.RowType == DataControlRowType.DataRow)
     var pdt = from p in listpdt
          where p.ProductName == “Apple”
          select p;
     GridView gdv = (GridView)e.Row.FindControl("GridView2");
     gdv.DataSource = pdt;

Suppose returns 4 result set of type IEnumerable and I am binding to Gridview which is nested in another Gridview.

at System.Web.UI.DataSourceView.RaiseUnsupportedCapab ilityError(DataSourceCapabilities capability)
   at System.Web.UI.DataSourceSelectArguments.RaiseUnsup portedCapabilitiesError(DataSourceView view)
   at System.Web.UI.WebControls.ReadOnlyDataSourceView.E xecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.GridView.CreateChildCont rols(IEnumerable dataSource, Boolean dataBinding)
   at System.Web.UI.WebControls.CompositeDataBoundContro l.PerformDataBinding(IEnumerable data)
   at System.Web.UI.WebControls.GridView.PerformDataBind ing(IEnumerable data)
   at System.Web.UI.WebControls.DataBoundControl.OnDataS ourceViewSelectCallback(IEnumerable data)
   at System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.DataBoundControl.Perform Select()
   at System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind()
   at System.Web.UI.WebControls.GridView.DataBind()
   at CollectionClass.GridView1_RowDataBound(Object sender, GridViewRowEventArgs e) in c:\Documents and Settings\A037034\My Documents\Visual Studio 2008\WebSites\WebSite2\CollectionClass.aspx.cs:lin e 88

"I'm a great believer in luck and I find the harder I work, the more I have of it "

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting a result set to a vector cakalanka Java Databases 1 March 24th, 2008 07:33 AM
Using LINQ, with BeerHouse /Instant Result Project SoftMind BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 June 21st, 2007 03:08 AM
xml result set truncated in sql query analyzer xologist SQL Server 2000 2 March 22nd, 2004 05:23 PM
write result set bmains SQL Server 2000 11 March 9th, 2004 09:31 AM
Result set jemacc SQL Server 2000 0 December 19th, 2003 07:26 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.