• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1230
  • Last Modified:

DataPager - hide previous button (image type) when needed

I am using a data pager with next previous pager fields (as images).  When the previous button is not a valid option, I would like it to be more visibly apparent.  For example, swapping out the image for a "grayed out" version, or simply just hiding the previous button.  How can I accomplish this?
<asp:DataPager ID="pgProducts" runat="server" PagedControlID="lvProducts" PageSize="3">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Image"  
                                NextPageImageUrl="/images/more.gif" 
                                PreviousPageImageUrl="/images/back.gif" />
                        </Fields>
                    </asp:DataPager>

Open in new window

0
centdevs
Asked:
centdevs
1 Solution
 
jmwheelerCommented:
There is a property on the NextPreviousPagerField called RenderDisabledButtonsAsLabels, you can set that to true.  You could then use CSS to modify the label as necessary.
0
 
centdevsAuthor Commented:
Wonderful that worked, thank you!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now