ListView, DataPager and EPi SeachDataSource problem

Per Nergård
Member since: 2007


I used a asp:ListView control and bound it to a EPi SearchDataSource which worked just fine.

 But when I add a DataPager and sets its control id to my listview I get a message like "capacity was less than the current size. Parameter name: value ".

Is I just making some stupid mistake or doesn't it work? I can use a pagelist to get the same looks, but I dont want the paging to be placed on top of the list. Instead I want it to be placed centered below the listing.

Here is the stacktrace.

[ArgumentOutOfRangeException: capacity was less than the current size.
Parameter name: value]
   System.Collections.ArrayList.set_Capacity(Int32 value) +7486847
   System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +509
   System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +33
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   System.Web.UI.WebControls.ListView.PerformSelect() +57
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Getinge.Templates.Compass.Pages.CareerSearch.Page_Load(Object sender, EventArgs e) in C:\EPiServer\Sites\GetingeIntra\Templates\Compass\Pages\CareerSearch.aspx.cs:43
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


#26544 Dec 10, 2008 15:22
  • Per Nergård
    Member since: 2007

    Ok if no one hase any input how do I go about to make sortable columns for the PageList.



    #26744 Dec 17, 2008 23:45
  • Shahid nawaz
    Member since: 2008

    Hi Per,

    This is a known bug in sp3 which has been fixed now and I guess will be shiped with R2-SP1.

    Bug #15718: DataPager doesn't work with SearchDataSource.


    EPiServer Support Team

    #26746 Dec 18, 2008 9:02
  • Per Nergård
    Member since: 2007

    Ok. It's possible to use a pagedatacollection as datasource to the listview, and I have got the paging to work ok with a datapager but I can't seem to get the sorting to work.

    I've set the onsorting on the listview and I have linkbuttons with the CommandName and CommandArgument set and the eventhandler is triggerd but nothing happens.

    Any tips?

    #26754 Dec 18, 2008 14:34


    Shahid, can you please confirm that this fix has been shipped with R2-SP1?

    Anton Kallenberg

    #29566 May 05, 2009 15:54
  • pappabj0rn
    Member since: 2007
    Anton Kallenberg, according to the info in the bug it should be fixed in R2 sp1.
    #29567 May 05, 2009 17:51
    Thx for that, Greger!
    #29613 May 06, 2009 22:55