473,322 Members | 1,526 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,322 software developers and data experts.

Repeater with CheckBox and Paging

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 which causes
my selections to go away.

Does anyone have working example code?

Thanks,
Mark
Nov 18 '05 #1
2 4994
Hi Mark,
Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you use the repeater control to hold a list of
checkboxes and you implemented your custom paging for the repeater so as to
rebind the repeater with different datas when different page of records if
requested. However, you found that after rebinding the data when paging ,
the checkboxes's value for the previous page will lose. So you 're looking
for some means to remain the checkboxes's state value, yes?
If there is anything I misunderstood, please feel free to let me know.
As for this problem, here is some of my suggestions:
Generally, when we use the list template control to bind and display some
certain collection of datas, if the data's count is very large, we need to
page them. However, since everytime the control is binded and display, only
a certain page's data would be binded and ouput to the user. Then, the
previous page's statues will be lose. So normally, we use the following
means regarding on such problem:
1. Let all the operations which are dependent on the page's status(such as
the checkboxes's checked value) be done right
at or before the paging event happened. That means we will do data
manipulations on every page's data so that if the page changed, the former
data has been successfully dealt, we won't need to store it for further use.
For example:
We have a product lists and every product have a "selected" attribute, we
represent this attribute using a "checkbox" column in Repeater. We may need
to display all the productes in several pages, then everytime page is
changing , we need to do operation to retrieve all the states of the
checkboxes and then update the recored in the datasource(maybe the database
server or other collections in memory)

2. We use some Collections to store the state values on the former page on
the serverside. For example, just the product lists I mentioned above. When
user clicked a page index and change the current page, we retrieve all the
checkboxes' value and then store the value in a array or ArrayList
collection and save it into the Session or Applicatoin area as temp data.
When we need to use it again, then we retrieve it from the Session or
Application. If useless, remove them.

Please consider the above suggestions. I still recommend that you deal with
a certain page's data (state value on page) within the life cyle when it is
the current page since it lose performance if you use serverside memory
(such as Session or application) to store the state datas. How do you think
of it?

If you have any questions or need any other assistance, please feel free to
post here. I'll do some further research to help you.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2
Hi Mark,

I'm reviewing this message and found that you've posted a new thread as:
" Additional Repeater questions for Steven Cheng" on this issue.
And I've replied you in that thread. Do you feel it convenient that we
continue to discuss in that thread?
If you have any questions or need any help, please feel free to post in the
new thread. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #3

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

Similar topics

0
by: Viktor Popov | last post by:
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");...
0
by: Viktor Popov | last post by:
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");...
2
by: Thomas R | last post by:
Is is possible? In VS.NET 2003, Binding data to the repeater is easy, but when I try to add an ASP:checkbox to the .aspx page, the designer won't recognize it, hence the code view doesn't allow...
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
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
2
by: Ceema M via DotNetMonster.com | last post by:
Hello all, I have a nested repeater, which displays categories(parent repeater) and corresponding subcategories(child repeater). Both repeaters have checkboxes. When I check category checkbox...
3
by: renil | last post by:
I have a repeater control that displays info. from a datatable. Each row in the repeater has a checkbox. Also, I have a delete linkbutton outside the repeater control. What I'm trying to do when...
1
by: Doogie | last post by:
Hi, I have been trying to get a checkbox added to a repeater control of mine and then try to access events of the repeater control when a user clicks the checkbox. At first, since the control is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.