I've been experimenting more with composite-element, and it seems the a composite-element collection is read-only. Everytime I try to add something to the IList I receive a NotSupportException:
Code:
[NotSupportedException: Collection is read-only.]
System.Collections.ReadOnlyList.Add(Object obj) +48
SpringAir.SpecAndQuote.Product.ControlPanel.cmdExSupInclude_Click(Object sender, EventArgs e) in C:\Documents and Settings\Sandro\My Documents\SpringAirRepo\SpecAndQuote\trunk\Product\ProductType\ControlPanel\Controller.cs:728
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1281
Is this intentional? Are the composite-element collections intended to be replaced entirely instead of being added to? ie.
Code:
IList l = new ArrayList(oldList);
l.Add(item);
obj.list = l;
//... instead of
obj.list.Add(item);