Objectdatasource always passes 0 and startIndex and pageSize in asp.net 2.0

Posted by 101873438432680351218 on Stack Overflow See other posts from Stack Overflow or by 101873438432680351218
Published on 2010-05-19T15:18:21Z Indexed on 2010/05/19 15:20 UTC
Read the original article Hit count: 575

I have a DevXpress ASPXGridview, and I am using ObjectDataSource for custom paging. This is my objectDataSource code on aspx page.

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetItems" EnablePaging="true" TypeName="BLL.Item" StartRowIndexParameterName="startIndex" MaximumRowsParameterName="pageSize" SelectCountMethod="GetTotalItems" > <SelectParameters> <asp:ControlParameter ControlID="hfNumber" Name="number" Type="string" /> <asp:ControlParameter ControlID="hfDesc" Name="description" Type="string" /> </SelectParameters> </asp:ObjectDataSource>

When I put breakpoints in BLL code, I see that it always executes with startIndex and pageSize as 0. It does pass the other two selectparameters correctly. Also the SelectCountMethod (GetTotalItems) never gets executed.

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-2.0