The data source does not support sorting ???

Posts   
 
    
Vladimir
User
Posts: 5
Joined: 24-Mar-2006
# Posted on: 24-Mar-2006 17:26:58   

After binding sorted EntryCollection to GridView in anythere, exception occurred then binding new EntryCollection (sorted or not sorted).

Code, for instance :

_ ContactListViewCollection list = new ContactListViewCollection(); list.SupportsSorting = true; _gvContactList.DataSource = list; _gvContactList.DataBind(); <------------ Error _

And we have System.NotSupportedException: The data source does not support sorting. Exception

confused ???

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 24-Mar-2006 17:29:43   

Hmm. that's strange, because the IBindingList property which reports if the collection supports sorting or not IS SupportsSorting, and you set that to true...

.NET 2.0 I pressume? If so, it can be a bit problematic perhaps with the new controls of asp.net 2.0, though I haven't heard of any other problems..

Frans Bouma | Lead developer LLBLGen Pro
Vladimir
User
Posts: 5
Joined: 24-Mar-2006
# Posted on: 24-Mar-2006 17:31:28   

Yes simple_smile - and have many problems with GridView ?? ASP.NET 2.0...

Vladimir
User
Posts: 5
Joined: 24-Mar-2006
# Posted on: 24-Mar-2006 17:34:45   

Bug listing: _ [NotSupportedException: The data source does not support sorting.] System.Web.UI.DataSourceView.RaiseUnsupportedCapabilityError(DataSourceCapabilities capability) +176 System.Web.UI.DataSourceSelectArguments.RaiseUnsupportedCapabilitiesError(DataSourceView view) +54 System.Web.UI.WebControls.ReadOnlyDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +31 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +84 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +155 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +99 System.Web.UI.WebControls.GridView.DataBind() +24 _

and IBindingList has correct property

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 24-Mar-2006 17:50:22   

If you switch off sorting in the gridview definition, it should bind. Of course, column sorting then doesn't work, though I think that's because gridview wants to deal with a DataSourceControl.

Frans Bouma | Lead developer LLBLGen Pro