コード例 #1
0
        public DataList ToDataList()
        {
            var columns = new List<DataHeader>();

            foreach (var header in Headers)
            {
                var newheader = new DataHeader(header.Name, header.Type);
                if (!string.IsNullOrEmpty(header.Caption))
                    newheader.Caption = header.Caption;
                columns.Add(newheader);
            }

            var result = new DataList(columns);

            foreach (var row in Items)
            {
                var item = result.AddData(row.Select(p => p.FormattedValue).ToArray());
            }
            return result;
        }
コード例 #2
0
        public DataList ToDataList()
        {
            var columns = new List <DataHeader>();

            foreach (var header in Headers)
            {
                var newheader = new DataHeader(header.Name, header.Type);
                if (!string.IsNullOrEmpty(header.Caption))
                {
                    newheader.Caption = header.Caption;
                }
                columns.Add(newheader);
            }

            var result = new DataList(columns);

            foreach (var row in Items)
            {
                var item = result.AddData(row.Select(p => p.FormattedValue).ToArray());
            }
            return(result);
        }