Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
WebDataGrid async request failed on paging
posted

I'm getting an IndexOutOfRangeException when paging a WebDataGrid. The grid loads data and allows me to page to the second page without issue. If I attempt to page back to the first page, I get the following:

Markup for the grid is below. The grid pulls the data through a SqlDataSource object.

<ig:WebDataGrid ID="wdgIncomeTransactions" runat="server" Height="435px" Width="99%"
    AutoGenerateColumns="False" StyleSetName="Windows7"
    EnableDataViewState="True" ViewStateMode="Enabled">
    <Behaviors>
        <ig:Sorting Enabled="true" SortingMode="Single" />
        <ig:Paging Enabled="true" PagerMode="NumericFirstLast" PageSize="50" />
        <ig:ColumnResizing Enabled="true" />
        <ig:Filtering Enabled="true" Visibility="Visible" />
        <ig:SummaryRow Enabled="false" EmptyFooterText="no results">
        </ig:SummaryRow>
    </Behaviors>
    <Columns>
        <ig:TemplateDataField Key="TransactionId" Width="50px">
            <ItemTemplate>
                <a href="NewTransaction.aspx?transactionId=<%# DataBinder.Eval(Container, "DataItem.TransactionId") %>">
                    <%# DataBinder.Eval(Container, "DataItem.TransactionId")%></a>
            </ItemTemplate>
            <Header Text="Id" />
        </ig:TemplateDataField>
        <ig:TemplateDataField Key="TransactionIdExport" Width="50px" Hidden="true">
            <ItemTemplate>
                <%# DataBinder.Eval(Container, "DataItem.TransactionId")%>
            </ItemTemplate>
            <Header Text="Id" />
        </ig:TemplateDataField>
        <ig:TemplateDataField Key="Status" Width="50px">
            <ItemTemplate>
                <%# DataBinder.Eval(Container, "DataItem.Status") %>
            </ItemTemplate>
            <Header Text="Status" />
        </ig:TemplateDataField>
        <ig:BoundDataField DataFieldName="Description" Key="Description" Footer-CssClass="accountingColumn"
            Width="100px">
            <Header Text="Description" />
            <Footer CssClass="accountingColumn"></Footer>
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="Investment Type" Key="Investment Type" Footer-CssClass="accountingColumn"
            Width="50px">
            <Header Text="Type" />
            <Footer CssClass="accountingColumn"></Footer>
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="Owner" Key="Owner" Footer-CssClass="accountingColumn">
            <Header Text="Owner" />
            <Footer CssClass="accountingColumn"></Footer>
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="Investment" Key="Investment" Footer-CssClass="accountingColumn">
            <Header Text="Investment" />
            <Footer CssClass="accountingColumn"></Footer>
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="NaturalAmount" DataFormatString="{0:c}" Width="100px"
            DataType="System.Decimal" Key="NaturalAmount" CssClass="accountingColumn">
            <Header Text="Amount" CssClass="accountingColumn" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="DR" Key="DR">
            <Header Text="Debit Account" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="CR" Key="CR">
            <Header Text="Credit Account" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="BatchNumber" Key="BatchNumber" Width="25px">
            <Header Text="Batch" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="Effective Date" DataType="System.DateTime" Width="75px"
            Key="Effective Date">
            <Header Text="Effective" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="Allocated Date" DataType="System.DateTime" Width="75px"
            Key="Allocated Date">
            <Header Text="Allocated" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="AddedBy" Width="75px" Key="AddedBy">
            <Header Text="User" />
        </ig:BoundDataField>
    </Columns>
</ig:WebDataGrid>