473,288 Members | 2,725 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,288 software developers and data experts.

Checkboxes with Repeaters and DataGrids

I am having trouble getting checkboxes to work within Repeaters and
DataGrids

I have tried to access the value of each checkbox within a repeater
which has been ticked as follows :-

string sValues ="values";
foreach (RepeaterItem ri in rptrPublications.Items){
CheckBox cbx = (CheckBox)ri.FindControl("cbxPub");
if(cbx.Checked){
sValues = sValues + cbx.Checked.ToString();
}
}
Response.Write(sValues);

For some reason, it doesn't recognise the cbx.Checked statement, but
if I remove this line, it happily writes out the values of each
checkbox.

I am also having getting a checkbox's OnCheckedChanged event to fire
when it's within either s Repeater or a DataGrid

Could anyone please put forward some suggestions ?

Thanks
Jul 21 '05 #1
0 954

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

Similar topics

7
by: DJ Dev | last post by:
Hi All, I have a complex problem. I have dropdownlists (usually 3-5) and the user selects some value from these and for each value selected, datagrids are shown to the user. I am creating the...
0
by: Machi | last post by:
> let say i created nested repeaters in HTML page of a particular Web Form Parent repeater dubbed >> "parentRepeater", child Repeater dubbed "childRepeater" . Withi "parentRepeater" and...
0
by: Machi | last post by:
let say in parent-child scenerio (Product: Product Category - one product category may has many products), i am using nested repeaters where parent repeater will be used to display info and child...
1
by: Abhijit Salvi via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Abhijit Salvi Hi All, I am working on a DataGrid that has a column of Checkbox Controls. There is some Business Functionality...
4
by: Jim Bancroft | last post by:
Hi everyone, I'm using a DataGrid with TemplateColumns. My DataGrid is located in a cell of an asp:Table. I did this so it's positioned correctly onscreen. One of the DataGrid's...
0
by: Fresh Air Rider | last post by:
I am having trouble getting checkboxes to work within Repeaters and DataGrids I have tried to access the value of each checkbox within a repeater which has been ticked as follows :- string...
6
by: nasirmajor | last post by:
dear all, i have a datagrid with checkboxes for selection of rows. and want to get unique id/ids(job_code) from the selected rows in array etc. can anyone help. <asp:datagrid id="dgResults"...
1
by: andrew.douglas11 | last post by:
Hello all, Is it possible to share controls inside a child repeater? Here's the situation: I have a web page that needs to display data grouped by A, and alternatively by B (only one grouping...
1
by: Cdude | last post by:
I have a datagrid with checkboxes in it.I have a total column. Now whenever a checkbox is ticked i need to retrieve the total of that row.
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...

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.