473,406 Members | 2,956 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,406 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 1606
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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,...

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.