CheckboxList inside a usercontrol inside of a datalist.

Discussion in 'ASP .Net' started by =?Utf-8?B?dmJNZW50YWw=?=, Oct 30, 2004.

  1. I'm almost certain this is a bug, or atleast "undesirable behavior".

    I felt the checkbox list control had shortcomings so I ventured on creating
    my own checkbox list user control. To put it shortly, the usercontrol had a
    checkbox list inside of it, that would be bound by a datasource that was to
    be specified as a property of the control. It also had an all checkbox at the
    top that would select all of the checkboxes in the list...
    The problem came with the property I added to the control SelectedItems.
    This property was to be set after the Items property was set and the checkbox
    list was databound to it. Then the selectedItem property was set and the
    selected items would be checked. <--- That is where the buggy behavior came
    in.

    From my tests, it appears that if you use databinding on a checkbox list or
    datalist with checkboxes as items, inside of a usercontrol and put that
    usercontrol inside of a datagrid as an item, and try to check those
    checkboxes in code - IT WILL NOT WORK.

    I know it sounds crazy but I learned the hard way. I will post code soon to
    show you. For now, just let me know if it rings a bell.
    =?Utf-8?B?dmJNZW50YWw=?=, Oct 30, 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. JD
    Replies:
    5
    Views:
    11,608
    NetArchitect
    Aug 8, 2007
  2. nail
    Replies:
    0
    Views:
    1,519
  3. Patrick.O.Ige
    Replies:
    5
    Views:
    19,059
    Patrick.O.Ige
    Jun 19, 2005
  4. dealkk
    Replies:
    0
    Views:
    470
    dealkk
    Jul 26, 2005
  5. Mike
    Replies:
    1
    Views:
    1,817
    Keith Patrick
    Jan 12, 2006
Loading...

Share This Page