Пример #1
0
        /// <summary>
        /// Render grid body
        /// </summary>
        /// <param name="grid">Grid to render</param>
        /// <param name="entities">List of entities to render</param>
        /// <returns>Render grid body in string</returns>
        private string RenderBody(Grid grid, List<object> entities)
        {
            var bodyRender = string.Empty;
            foreach (var entity in entities)
            {
                var column = string.Empty;
                foreach (var row in grid.Rows)
                {
                    var cell = new HtmlTableCell();                   
                    cell = this.ConfigureTableCell(cell, row, entity);
                    column += cell.ToString();                   
                }

                bodyRender += string.Format("<tr>{0}</tr>", column);
            }

            return string.Format("<tbody>{0}</tbody>", bodyRender);
        }