At 15:47 26-04-2002 -0500, you wrote: >Just add LinkButton commands where you want them and in the server side code >for their click event, increment or decrement the page index. The catch is >that you need to keep track of the current page index. I do this by setting >the command argument of the link buttons to the next page index. Then I use >that in the server side event to set the page index of the grid. > >Then, in the PreRender event for the page, check the page index and if it is >0 then set the visible property of the prev link to false and if it equals >the page count, then make the visible property of the next button to false.
This makes sense, and I've found an example that does it like that. But what if, like I mentioned, I _don't_ want the "[" and "]" tha surround the LinkButton to be part of the link? How do I hide it? can I surround it with a runat="server" SPAN, for example, and make this invisible? j >HTH, >Matt > >-----Original Message----- >From: Joćo Pedro Martins >To: [EMAIL PROTECTED] >Sent: 4/26/02 2:04 PM >Subject: [DOTNET] Question: DataGrid Paging >Importance: High > >Hello, > >simple? question: > >I have a simple data-binded DataGrid with paging enabled >in a Asp.net Web Form application. The webdesigner asked >the Prev/Next links to take the form: > > >[ _PreviousPageLink_ ] [ _NextPageLink_ ] > >where the "[" and "]" are NOT part of the link. > >Furthermore, he doesn't want the Prev link to exist when >we are in the first page, and the Next link in the last >page. > >So, on the first page, I should have: >[ _NextPageLink_ ] > >and on the last: >[ _PreviousPageLink_ ] > >I am having several problems with this: > >- all the paging examples I've seen always show both the >prev/next link text, even if one of the links is simply >disabled. > >- there is no case where the link is between [ ] or other >surrounding sequences. > > >Any help? > >Thanks in advance, >joćo martins >-- >Joćo Pedro Martins >[EMAIL PROTECTED] >|create|it| >http://www.create.pt >http://www.usabilidade.com > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, >or >subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.