Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Checkboxes with Repeaters and DataGrids

Reply
Thread Tools

Checkboxes with Repeaters and DataGrids

 
 
Fresh Air Rider
Guest
Posts: n/a
 
      03-05-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested datagrids or repeaters...etc. Maziar Aflatoun ASP .Net Datagrid Control 0 01-30-2005 09:52 PM
nested Repeaters with javascript checkboxes =?Utf-8?B?TWFjaGk=?= ASP .Net 0 04-16-2004 05:26 AM
Checkboxes with Repeaters and DataGrids Fresh Air Rider ASP .Net Datagrid Control 0 03-05-2004 10:13 PM
Checkboxes with Repeaters and DataGrids Fresh Air Rider ASP .Net 0 03-05-2004 10:12 PM
Repeaters, Datalists and Datagrids ASP .Net 0 11-05-2003 11:55 AM



Advertisments