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

datarepeater question

Hi,

I have a quick question. I am displaying all the orders that are active. I
am making use of a datarepeater with checkboxes to display data and a submit
button to insert into the database.

suppose i want to make the orders inactive using the checkboxes and click on
the submit button should update the database.

How do I capture the event such that only those check boxes that have been
checked are updated and not others?

Thanks,
Stephen.
Nov 22 '05 #1
3 1602
I assume that the data the repeater is showing is in a DataTable in a
DataSet, right? If so, add a DataColumn to that table to store a Boolean
value that will be set via the checkbox in the repeater.

This way, when you call the Update method of the DataAdapter to migrate your
changes to the original data source, you can write your update command to
update only those records that have that Boolean flag set to true.

One note here, though. Repeater controls do not support editing of data, so
you should use either a DataList control or a DataGrid control.
"Stephen" <st*********@hotmail.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have a quick question. I am displaying all the orders that are active. I
am making use of a datarepeater with checkboxes to display data and a submit button to insert into the database.

suppose i want to make the orders inactive using the checkboxes and click on the submit button should update the database.

How do I capture the event such that only those check boxes that have been
checked are updated and not others?

Thanks,
Stephen.

Nov 22 '05 #2
Hi Scott,

Do you have any sample example or code that i can take a look at

Thanks,
Stephen.

"Scott M." <s-***@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I assume that the data the repeater is showing is in a DataTable in a
DataSet, right? If so, add a DataColumn to that table to store a Boolean
value that will be set via the checkbox in the repeater.

This way, when you call the Update method of the DataAdapter to migrate your changes to the original data source, you can write your update command to
update only those records that have that Boolean flag set to true.

One note here, though. Repeater controls do not support editing of data, so you should use either a DataList control or a DataGrid control.
"Stephen" <st*********@hotmail.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have a quick question. I am displaying all the orders that are active. I am making use of a datarepeater with checkboxes to display data and a submit
button to insert into the database.

suppose i want to make the orders inactive using the checkboxes and click on
the submit button should update the database.

How do I capture the event such that only those check boxes that have

been checked are updated and not others?

Thanks,
Stephen.


Nov 22 '05 #3
Just paraphrasing here, so you will need to check this for accuracy.

'Assuming you have a DataSet that is populated already
'Create new column of the Boolean type and add to the table in the DataSet
dim dc as New DataColumn("UpdateColumn",boolean)

dsProds.Tables(0).Columns.Add(dc)

'When handling the Update button from the list control,

'check the checkbox of the selected row (use FindControl(controlName))

'to see if the checkbox was checked for that row

'As part of your UPDATE commandText add a WHERE clause

'that checks the row(s) for the boolean column for true

UPDATE .... WHERE "UpdateColumn" = True


"Stephen" <st*********@hotmail.com> wrote in message
news:OX*************@TK2MSFTNGP09.phx.gbl...
Hi Scott,

Do you have any sample example or code that i can take a look at

Thanks,
Stephen.

"Scott M." <s-***@nospam.nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I assume that the data the repeater is showing is in a DataTable in a
DataSet, right? If so, add a DataColumn to that table to store a Boolean
value that will be set via the checkbox in the repeater.

This way, when you call the Update method of the DataAdapter to migrate your
changes to the original data source, you can write your update command to update only those records that have that Boolean flag set to true.

One note here, though. Repeater controls do not support editing of

data, so
you should use either a DataList control or a DataGrid control.
"Stephen" <st*********@hotmail.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have a quick question. I am displaying all the orders that are
active. I am making use of a datarepeater with checkboxes to display data and a

submit
button to insert into the database.

suppose i want to make the orders inactive using the checkboxes and click
on
the submit button should update the database.

How do I capture the event such that only those check boxes that have

been checked are updated and not others?

Thanks,
Stephen.



Nov 22 '05 #4

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

Similar topics

2
by: muhamad | last post by:
Hi, How can I use the DataRepeater in CSharp , this control exists in VB6 ,i never used it . I want to insert into the DataRepeater TextBoxs that will show all the time data from the database ....
1
by: craigkenisston | last post by:
Microsoft's datarepeater sample causes warning in the IDE. Hi, The code here : ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpgenref/html/cpconrepeaterwebservercontrol.htm Causes the...
3
by: | last post by:
Hi, NG! Is there any updated version (.Net) of the Datarepeater control or do I have to use the old (VS6.0) version? Thanks. pax
2
by: Neven Klofutar | last post by:
Hi, How can I bind ArrayList of my object to DataRepeater ? I have 2 classes: public class Movie { private String _Name = ""; private Double _Price = 0;
1
by: Chris Leffer | last post by:
Hi. I have a DataRepeater that is filled with the results of a query based on four criteria fields. If one of these criterias is informed, I don't need to display a certain column in my...
3
by: Stephen | last post by:
Hi, Does anyone have a sample of a DataRepeater with Radiobuttons? I am trying to have a datarepeater with radiobuttons but for some reason (suppose there are 10 rows) only the first row has a...
1
by: Stephen | last post by:
Hi, I have a quick question. I am displaying all the orders that are active. I am making use of a datarepeater with checkboxes to display data and a submit button to insert into the database. ...
2
by: Arsalan | last post by:
What is the equivalent of DataRepeater control in VB.NET ?
1
by: =?Utf-8?B?QW1qYWQ=?= | last post by:
Hi i have datarepeater in which i have textboxes, how to create txtCustID_TextChanged event in datarepeater like simple textbox its easy double click it and it create automatically the event but in...
2
by: Tony K | last post by:
I downloaded the new VB PowerPack 3.0 and began using the DataRepeater. I have 2 DateTimePickers, current and future. When I add a new item, to the datarepeater, I want to automatically add 1...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.