protected void MakeFirstRDataSource() { RDataSource = new List <KDataSource <TItem> >(); foreach (var row in DataSource) { var rRow = new KDataSource <TItem>(); rRow.Data = row; var i = DataSource.IndexOf(row); if (i == 0) { rRow.RData = MyAnnotations.Parse(row).Select(m => new ReflectedCell <TItem> { Model = m }.ApplyConditions(RConditions)).ToList(); } else { rRow.RData = MyAnnotations.Parse(row).Select(m => new ReflectedCell <TItem> { Model = m }).ToList(); } RDataSource.Add(rRow); } }
protected void MakeOneRDataSource(TItem row) { var rRow = new KDataSource <TItem>(); rRow.Data = row; rRow.RData = (from m in MyAnnotations.Parse(row) select new ReflectedCell <TItem> { Model = m }.ApplyConditions(RConditions)) .ToList(); RDataSource.Add(rRow); }
protected void MakeAllRDataSource() { RDataSource = new List <KDataSource <TItem> >(); foreach (var row in DataSource) { var rRow = new KDataSource <TItem>(); rRow.Data = row; rRow.RData = MyAnnotations.Parse(row).Select(m => new ReflectedCell <TItem> { Model = m }.ApplyConditions(RConditions)).ToList(); RDataSource.Add(rRow); } }