This project is read-only.

Checkboxlist

Mar 22, 2009 at 10:01 PM
Does anybody have a simple example of an implementation of a (multiple select) checkboxlist?

Thanks!
Mar 23, 2009 at 12:09 AM
What kind of check box list are you pursuing? Here's an example of multi checkbox for editing roles on a content item: http://code.google.com/p/n2cms/source/browse/trunk/src/N2.Security/Details/EditableRolesAttribute.cs
Mar 23, 2009 at 8:44 AM
just the one I was looking for...thanks!
Apr 24, 2009 at 4:43 PM
I would have liked a nice example.. :(

I'm trying to implement something like this, so I can have my own EditableCheckBoxListAttribute. I'm not sure how it's used though .. do devs to pass the list of items to it? how does the list get populated in other circumstances?

Any help appreciated!
Cheers
Pete
Apr 24, 2009 at 11:14 PM
Take another look at the code and keep in mind these hints:
  • AddEditor: This is where you create the web control, populate the list and add it to the control tree.
  • UpdateEditor: This is where you bind data from the content item to the editor
  • UpdateItem: This is where you read the input from the control and store it in the item