J
Jeff
hi there
asp.net 2.0
I'm having problem with paging in GridView, I'm using custom paging. The
ObjectDataSource reads in the rows needed for displaying each page as each
page is selected. So that the entire resultset isn't read, but instead just
enough to display the pages.
The problem now is that the GridView is only displaying the 2 rows, The
GridView contain 3 pages, it doesn't matter what page I click on, because
the GridView displays the same rows on every page. I want the GridView to
display different rows on different pages - Normal behavior... Other thing
that is strange with my GridView is that after I've clicked on the different
pages for a while then it starts to display only 1 row on each page... And
if I do even more clicking on different pages it starts to display no rows
at all
This is the top markup of the GridView:
<asp:GridView ID="gvwCars"
Width="100%"
BorderWidth="0"
runat="server"
AllowPaging="true"
AllowSorting="true"
PageSize="2"
AutoGenerateColumns="false"
ShowHeader="false"
DataKeyNames="Id"
DataSourceID="odsCars"
OnRowDataBound="gvwCars_RowDataBound">
<Columns>
Here is the markup of the ObjectDataSource:
<asp:ObjectDataSource ID="odsCars"
TypeName="BLL.Car"
MaximumRowsParameterName="maximumRows"
StartRowIndexParameterName="startRowIndex"
SelectMethod="GetCars" SelectCountMethod="GetCarsCount"
EnablePaging="true"
runat="server" >
<SelectParameters>
<asparameter DefaultValue="false" Type="Boolean" Name="sorttype" />
<asparameter DefaultValue="false" Type="Boolean" Name="approved" />
<asparameter DefaultValue="10" Type="Int32" Name="maximumRows" />
<asparameter DefaultValue="0" Type="Int32" Name="startRowIndex" />
</SelectParameters>
</asp:ObjectDataSource>
any suggestions how to fix this? also PageSize=2 (GridView) does that mean
that the value 2 is copied over MaximumRowsParameterName, I don't see in
other ways the value 2 can be transferred to the ods. I don't specify 2 any
other place..
Best Regards
asp.net 2.0
I'm having problem with paging in GridView, I'm using custom paging. The
ObjectDataSource reads in the rows needed for displaying each page as each
page is selected. So that the entire resultset isn't read, but instead just
enough to display the pages.
The problem now is that the GridView is only displaying the 2 rows, The
GridView contain 3 pages, it doesn't matter what page I click on, because
the GridView displays the same rows on every page. I want the GridView to
display different rows on different pages - Normal behavior... Other thing
that is strange with my GridView is that after I've clicked on the different
pages for a while then it starts to display only 1 row on each page... And
if I do even more clicking on different pages it starts to display no rows
at all
This is the top markup of the GridView:
<asp:GridView ID="gvwCars"
Width="100%"
BorderWidth="0"
runat="server"
AllowPaging="true"
AllowSorting="true"
PageSize="2"
AutoGenerateColumns="false"
ShowHeader="false"
DataKeyNames="Id"
DataSourceID="odsCars"
OnRowDataBound="gvwCars_RowDataBound">
<Columns>
Here is the markup of the ObjectDataSource:
<asp:ObjectDataSource ID="odsCars"
TypeName="BLL.Car"
MaximumRowsParameterName="maximumRows"
StartRowIndexParameterName="startRowIndex"
SelectMethod="GetCars" SelectCountMethod="GetCarsCount"
EnablePaging="true"
runat="server" >
<SelectParameters>
<asparameter DefaultValue="false" Type="Boolean" Name="sorttype" />
<asparameter DefaultValue="false" Type="Boolean" Name="approved" />
<asparameter DefaultValue="10" Type="Int32" Name="maximumRows" />
<asparameter DefaultValue="0" Type="Int32" Name="startRowIndex" />
</SelectParameters>
</asp:ObjectDataSource>
any suggestions how to fix this? also PageSize=2 (GridView) does that mean
that the value 2 is copied over MaximumRowsParameterName, I don't see in
other ways the value 2 can be transferred to the ods. I don't specify 2 any
other place..
Best Regards