12345678910111213141516171819202122232425262728293031323334353637 |
- using FastReport.Utils;
- namespace FastReport.Data
- {
- /// <summary>
- /// Represents the collection of <see cref="TableDataSource"/> objects.
- /// </summary>
- public class TableCollection : FRCollectionBase
- {
- /// <summary>
- /// Gets or sets a data table.
- /// </summary>
- /// <param name="index">The index of a data table in this collection.</param>
- /// <returns>The data table with specified index.</returns>
- public TableDataSource this[int index]
- {
- get { return List[index] as TableDataSource; }
- set { List[index] = value; }
- }
- /// <summary>
- /// Sorts tables by their names.
- /// </summary>
- public void Sort()
- {
- InnerList.Sort(new DataSourceComparer());
- }
- /// <summary>
- /// Initializes a new instance of the <see cref="TableCollection"/> class with default settings.
- /// </summary>
- /// <param name="owner">The owner of this collection.</param>
- public TableCollection(Base owner) : base(owner)
- {
- }
- }
- }
|