Checkboxes with Repeaters and DataGrids

Discussion in 'ASP .Net Datagrid Control' 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:
    481
    Fresh Air Rider
    Mar 5, 2004
  2. Guest

    Repeaters, Datalists and Datagrids

    Guest, Nov 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    328
    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:
    520
    =?Utf-8?B?TWFjaGk=?=
    Apr 16, 2004
  4. Maziar Aflatoun

    Nested datagrids or repeaters...etc.

    Maziar Aflatoun, Jan 30, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    121
    Maziar Aflatoun
    Jan 30, 2005
  5. Fresh Air Rider

    Checkboxes with Repeaters and DataGrids

    Fresh Air Rider, Mar 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    Fresh Air Rider
    Mar 5, 2004
Loading...

Share This Page