Is it possible to add:
"First, Last, Next, Previous" options to the GridView paging? I can't seem to figure it out. All I can get are numbers and >> for last and << for first...
<asp:GridView ID="gridView" runat="server" AllowPaging="True">
<PagerSettings Mode="NextPreviousFirstLast" FirstPageText="First" PreviousPageText="Previous" NextPageText="Next" LastPageText="Last" />
</asp:GridView>
You can set these values from the Properties window in the designer too ..
The default Pager of GridView is not flexible.
The alternatives are these
Yes it is possible using PagerSettings property of gridview, all you need to do is- set Mode of PagerSetting to 'NextPreviousFirstLast' so that you can use "First, Last, Next, Previous" option for paging with gridview.
<PagerSettings Mode="NextPreviousFirstLast" FirstPageText="First" PreviousPageText="Previous" NextPageText="Next" LastPageText="Last" />
There are three more properties of Mode like "NextPrevious" , "Numeric" and "NumericFirstLast"
to use them ..
NextPrevious :
<PagerSettings Mode="NextPrevious" PreviousPageText="Previous" NextPageText="Next"/>
Numeric :
<PagerSettings Mode="Numeric" />
NumericFistLast :
<PagerSettings Mode="NumericFistLast" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With