1 /* System.Web.UI.HtmlControls
3 * Leen Toelen (toelen@hotmail.com)
9 using System.Collections;
11 namespace System.Web.UI.HtmlControls{
12 public sealed class HtmlTableCellCollection : ICollection {
13 private HtmlTableRow _owner;
15 internal HtmlTableCellCollection(HtmlTableRow owner){
19 public void Add(HtmlTableCell cell){
24 if (_owner.HasControls()) _owner.Controls.Clear();
27 public void CopyTo(Array array, int index){
28 //FIXME: convert to foreach loop
29 IEnumerator i = GetEnumerator();
31 array.SetValue(i.Current, index++);
35 public IEnumerator GetEnumerator(){
36 return _owner.Controls.GetEnumerator();
39 public void Insert(int index, HtmlTableCell cell){
40 _owner.Controls.AddAt(index,cell);
43 public void Remove(HtmlTableCell cell){
44 _owner.Controls.Remove(cell);
47 public void RemoveAt(int index){
48 _owner.Controls.RemoveAt(index);
53 if (_owner.HasControls()) return _owner.Controls.Count;
58 public bool IsReadOnly {
64 public bool IsSynchronized {
70 public HtmlTableRow this[int index] {
72 return (HtmlTableRow) _owner.Controls[index];
76 public object SyncRoot {
82 } // end of System.Web.UI.HtmlControls.HtmlTableCellCollection