471,850 Members | 1,076 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,850 software developers and data experts.

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

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 1314

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
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.