This is a migrated thread and some comments may be shown as answers.

Errors when Paging selected Grid

1 Answer 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thilo
Top achievements
Rank 1
Thilo asked on 25 Sep 2014, 10:01 AM
I have a pretty straight-forward RadGrid, which is bound to a LinqDataSource. 
Paging works perfectly, until i select a row in the grid.

<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
    <Selecting AllowRowSelect="true"></Selecting>
</ClientSettings>

EnableViewState is on, AllowCustomPaging is set to off. 

I am getting this error:
Unhandled exception at line 1, column 123054 in http://localhost:56409/bundles/MsAjaxJs?v=D6VN0fHlwFSIWjbVzi6mZyE9Ls-4LNrSSYVGRU46XF81

0x800a139e - Laufzeitfehler in JavaScript: Sys.WebForms.PageRequestManagerServerErrorException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.

Parametername: index

(Translation: Index was out of range. Must be non-negative and less than the size of the collection. Parameter: Index)

Is there any solution to this? 
Again - I am DataBinding via a LinqDataSource (in markup only). There are other DataSources on the Page, which use the first DataSource in their whereparameters. Is this the Problem? 

DataSource Markup:
<asp:LinqDataSource ID="StellenLinqDS" runat="server" ContextTypeName="MySolution.DataObjects" EntityTypeName="" OrderBy="LetzteAktivitaet desc" Select="new (Name, Unternehmen, ID, Status, Anzahl, AnzahlPlaetze, LetzteAktivitaet)" TableName="StellenDaten" Where="Status != @Status">
<WhereParameters>
 <asp:Parameter DefaultValue="Archiv" Name="Status" Type="String" />
</WhereParameters>
</asp:LinqDataSource>

1 Answer, 1 is accepted

Sort by
0
Thilo
Top achievements
Rank 1
answered on 25 Sep 2014, 10:42 AM
The Error seems to be related to a RadListView that was showing details to the former RadGrid selected Row. 

The RadListView did have a property ClientDataKeyNames, which caused the Error. Removing this property solved the issue.
Tags
Grid
Asked by
Thilo
Top achievements
Rank 1
Answers by
Thilo
Top achievements
Rank 1
Share this question
or