Checkboxes with Repeaters and DataGrids

Discussion in 'ASP .Net Web Controls' started by Fresh Air Rider, Mar 5, 2004.

  1. 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
     
    Fresh Air Rider, Mar 5, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fresh Air Rider

    Checkboxes with Repeaters and DataGrids

    Fresh Air Rider, Mar 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    502
    Fresh Air Rider
    Mar 5, 2004
  2. Guest

    Repeaters, Datalists and Datagrids

    Guest, Nov 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    348
    Guest
    Nov 5, 2003
  3. =?Utf-8?B?TWFjaGk=?=

    nested Repeaters with javascript checkboxes

    =?Utf-8?B?TWFjaGk=?=, Apr 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    545
    =?Utf-8?B?TWFjaGk=?=
    Apr 16, 2004
  4. Fresh Air Rider

    Checkboxes with Repeaters and DataGrids

    Fresh Air Rider, Mar 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    158
    Fresh Air Rider
    Mar 5, 2004
  5. Maziar Aflatoun

    Nested datagrids or repeaters...etc.

    Maziar Aflatoun, Jan 30, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    138
    Maziar Aflatoun
    Jan 30, 2005
Loading...

Share This Page