using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using FastReport.Utils;
namespace FastReport.Table
{
///
/// Represents a collection of objects.
///
public class TableRowCollection : FRCollectionBase
{
///
/// Gets a row with specified index.
///
/// Index of a row.
/// The row with specified index.
public TableRow this[int index]
{
get
{
TableRow row = List[index] as TableRow;
row.SetIndex(index);
return row;
}
}
///
protected override void OnInsert(int index, object value)
{
base.OnInsert(index, value);
if (Owner != null)
(Owner as TableBase).CorrectSpansOnRowChange(index, 1);
}
///
protected override void OnRemove(int index, object value)
{
base.OnRemove(index, value);
if (Owner != null)
(Owner as TableBase).CorrectSpansOnRowChange(index, -1);
}
internal TableRowCollection(Base owner) : base(owner)
{
}
}
}