473,756 Members | 4,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.DataSour ce = ds.Tables[0].DefaultView;
objPds.AllowPag ing = true;
objPds.PageSize = 14;
int CurPage;
int FirstPage=1;
int LastPage=objPds .PageCount;
if (Request.QueryS tring["Page"] != null)
CurPage=Convert .ToInt32(Reques t.QueryString["Page"]);
else
CurPage=1;
objPds.CurrentP ageIndex = CurPage-1;
lblCurrentPage. Text = "óÔÒÁÎÉÃÁ ?: " + CurPage.ToStrin g() + " ÏÔ ÏÂÝÏ " +
objPds.PageCoun t.ToString();
if(!objPds.IsFi rstPage)
lnkFirst.Naviga teUrl=Request.C urrentExecution FilePath +"?Page=" +
Convert.ToStrin g(FirstPage);
if(!objPds.IsFi rstPage)
lnkPrev.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(CurPage-1);
if(!objPds.IsLa stPage)
lnkNext.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(CurPage+1);
if(!objPds.IsLa stPage)
lnkLast.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(LastPage);
MyRepeater.Data Source=objPds;
MyRepeater.Data Bind();

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 1562

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

Similar topics

2
5051
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 until it comes time to implement paging. Without paging I can iterate through the repeater when I click 'Select All' and set the checked property to true for all items in the repeater. However when I implement paging, I have to rebind the repeater...
2
1597
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 a sample 1-page ASP.Net apllication built to run against the SQL pubs database. There are contents of 2 files 1. ASPX, 2. ASPX.VB If there is anyway you can help, I'd really appreciate it.
3
2137
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
3219
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 to provide sorting very easily. is there any thing supported by repeater. Also for repeater I have one paging repeater class ready with me. So, i vcan simply derive a class from it and implement things But, what i want to know is which one is...
0
1796
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 for another repeater in page. (So I have a repeater and a Usercontrol that contains repeater)
8
4149
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 repeater working, and paging/sorting works, but there is a small bug that I can't seem to figure out. If, for example, I display 5 records per page, the paging function executes fine, and only shows 5 records per page. This is no problem. When I...
1
6428
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 binding it to a repeater control. This repeater control has multiple text boxes and buttons. Can you please tell me how can i do paging in this case ? I'm posting my code below. The problem is that if i click on "AdjustThisAd" button, it opens...
2
2234
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 AllowPaging or PageSize on the Repeater control, so I guess it isn't possible? if it is possible maybe somebody here could give me a tip on how
1
7132
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 following the www.asp.net data access tutorials to create a DAL and BLL to connect my web site (a simple real estate property search web site) to my database (Sql Express 2005).
3
3905
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 this. I don't care about development time or even maintainability...at this point I need to go for fastest performance. Which of the following do you think would be quickest?:
0
9431
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.