Disable single CheckBox in CheckBoxList?

Discussion in 'ASP .Net' started by MattB, Apr 27, 2007.

  1. MattB

    MattB Guest

    asp.net 1.1, vb.net

    I have a CheckBoxList that I need to conditionally disable one or more
    individual checkboxes from at runtime.

    I was hoping I could so something like:
    MyCheckBoxList.Items(1).Enabled = False

    But it doesn't appear to work that way. Can I do this or would I have to
    ditch the CheckBoxList and go with individual Checkboxes? I really hope
    I do not have to do that!

    Thanks!

    Matt
    MattB, Apr 27, 2007
    #1
    1. Advertising

  2. MattB

    Page Brooks Guest

    Matt,
    You can do what you just described in ASP.NET 2.0, but it doesn't look like
    you can do it quite that way in ASP.NET 1.x. However, you can try the
    following workaround:
    http://www.codeproject.com/aspnet/disableListItems.asp

    --
    Thanks,
    Page Brooks
    www.explosivedog.com


    "MattB" <> wrote in message
    news:...
    > asp.net 1.1, vb.net
    >
    > I have a CheckBoxList that I need to conditionally disable one or more
    > individual checkboxes from at runtime.
    >
    > I was hoping I could so something like:
    > MyCheckBoxList.Items(1).Enabled = False
    >
    > But it doesn't appear to work that way. Can I do this or would I have to
    > ditch the CheckBoxList and go with individual Checkboxes? I really hope I
    > do not have to do that!
    >
    > Thanks!
    >
    > Matt
    Page Brooks, Apr 27, 2007
    #2
    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. Hyrum Mortensen
    Replies:
    0
    Views:
    428
    Hyrum Mortensen
    Mar 4, 2004
  2. JD
    Replies:
    5
    Views:
    11,620
    NetArchitect
    Aug 8, 2007
  3. Patrick.O.Ige
    Replies:
    5
    Views:
    19,075
    Patrick.O.Ige
    Jun 19, 2005
  4. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,355
    ThunderMusic
    Jan 25, 2006
  5. Kevin
    Replies:
    2
    Views:
    247
Loading...

Share This Page