468,765 Members | 1,178 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

CheckboxList inside a usercontrol inside of a datalist.

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.
Nov 18 '05 #1
0 1227

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ed West | last post: by
3 posts views Thread by I am Sam | last post: by
2 posts views Thread by Patrick.O.Ige | last post: by
4 posts views Thread by Patrick.O.Ige | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.