473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Repeater paging problem

Hi,

I'm trying to do the following but I can't understand what's wrong. Could
you help me here!
I do paging with a Repeater like this:

DataSet ds = new DataSet();
dad.Fill(ds, "MyOffers");
if(ds.Tables[0].Rows.Count==0)
Delete.Enabled=false;

PagedDataSource objPds = new PagedDataSource();
objPds.DataSource = ds.Tables[0].DefaultView;
objPds.AllowPaging = true;
objPds.PageSize = 14;
int CurPage;
int FirstPage=1;
int LastPage=objPds.PageCount;
if (Request.QueryString["Page"] != null)
CurPage=Convert.ToInt32(Request.QueryString["Page"]);
else
CurPage=1;
objPds.CurrentPageIndex = CurPage-1;
lblCurrentPage.Text = "óÔÒÁÎÉÃÁ ?: " + CurPage.ToString() + " ÏÔ ÏÂÝÏ " +
objPds.PageCount.ToString();
if(!objPds.IsFirstPage)
lnkFirst.NavigateUrl=Request.CurrentExecutionFileP ath +"?Page=" +
Convert.ToString(FirstPage);
if(!objPds.IsFirstPage)
lnkPrev.NavigateUrl=Request.CurrentExecutionFilePa th + "?Page=" +
Convert.ToString(CurPage-1);
if(!objPds.IsLastPage)
lnkNext.NavigateUrl=Request.CurrentExecutionFilePa th + "?Page=" +
Convert.ToString(CurPage+1);
if(!objPds.IsLastPage)
lnkLast.NavigateUrl=Request.CurrentExecutionFilePa th + "?Page=" +
Convert.ToString(LastPage);
MyRepeater.DataSource=objPds;
MyRepeater.DataBind();

On this page I have a DELETE_BUTTON. When I have more than 14 results(more
than 1 page) and when I push the Button it doesn't work. When I go to the
last page and push the button the code in ON_CLICK_METHOD works. I can't
understand why. Could you help me here?

Thanks a lot!

Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17.9.2004 a.
Nov 16 '05 #1
0 1538

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark | last post by:
I am attempting to build a repeating list using a repeater control. I want to add a checkbox to each item (line) and 'Select All' and 'Clear All' buttons. I have figured out how to do this...
2
by: Mark | last post by:
I am trying to use a Pagable Repeater with checkboxes in ASP.Net, I cannot seem to associate the checkbox with a particular database record so I lose the checked state from page-to-page. Below is...
3
by: Mark | last post by:
I am looking for an example of using checkboxes in a repeater control where the checkbox state is persisted from page to page. Thank you, Mark
1
by: Pums | last post by:
Hi All For one page I want to implement sortng as well as paging. Curretly that page is using datagrid for data binding and sorting. Datagrid supports attributes like sortexpression and sort order...
0
by: Amir | last post by:
Hi every one This is the problem: I have a UserControl that contains a Repeater and a few LinkButton. The Repeater generate some linkButton. I use this control for implementing paging solution...
8
by: Matthew Curiale | last post by:
I am creating an app that lists clients of a company for management of different attributes for that company. The first page is a listing of the companies currently in the database. I have my...
1
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and...
2
by: Jeff | last post by:
Hey ASP.NET 2.0 GridView have AllowPaging & PageSize for the letting the GridView span multiple pages. But is the same allowed on a Repeater control? I didn't see any properties like...
1
by: jazzart | last post by:
Hi there, I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself regularly fumbling around in the dark a bit, so to speak. I'm currently using Visual Web Developer and have been...
3
by: NullQwerty | last post by:
Hey folks, I've got a DataGrid that has gotten a little out of control and really slow because of its complexity (bunch of Template Columns too). For performance reasons, I'm looking to change...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.