public void Append(HTMLPrinter printer, StringBuilder sb)
        {
            sb.Append("<table border='1'>");

            if (Columns.Count > 0)
            {
                sb.Append("<tr>");
                foreach (var col in Columns)
                {
                    sb.Append("<th colspan='" + col.Span + "'>" + col.Header + "</th>");
                }
                sb.Append("</tr>");
            }

            foreach (var item in Rows)
            {
                sb.Append("<tr>");
                foreach (var col in item)
                {
                    sb.Append("<td>");
                    printer.AppendItem(sb, col);
                    sb.Append("</td>");
                }
                sb.Append("</tr>");
            }
            sb.Append("</table>");
        }
        public void Append(HTMLPrinter printer, StringBuilder sb)
        {
            sb.Append("<table border='1'>");
            sb.Append("<tr>");
            foreach (var col in Columns)
            {
                sb.Append("<td>" + col.Heading + "</td>");
            }
            sb.Append("</tr>");

            foreach (var item in Items)
            {
                sb.Append("<tr>");
                foreach (var col in Columns)
                {
                    sb.Append("<th>");
                    printer.AppendItem(sb, col.Value(item));
                    sb.Append("</th>");
                }
                sb.Append("</tr>");
            }
            sb.Append("</table>");
        }
Example #3
0
 public IffPrinter(HTMLPrinter printer)
 {
     this.Printer = printer;
 }