public string RenderHeader(int headerDeep) { var th = new TagBuilder("th"); if (!ColumnWidth.IsNullOrEmpty()) { th.Attributes.Add("style", "width:" + ColumnWidth); } if (ColumnName.IsNullOrEmpty()) { ColumnName = FieldName; } if (Sortable) { th.InnerHtml = "<a href=\"javascript:void(0);\" sortField=\"" + FieldName + "\" >" + ColumnName + "</a>"; } else { th.InnerHtml = ColumnName; } if (Children.IsNullOrEmpty()) { th.Attributes.Add("rowspan", headerDeep.ToString()); } else { th.Attributes.Add("colspan", Colspan.ToString()); } return th.ToString(); }
private void RenderWarning(TagBuilder builder) { if (builder.TagName == "td") { builder.MergeAttribute("colspan", Colspan?.ToString() ?? "100"); } builder.AddCssClass("null-warning"); builder.AppendHtml("i", i => i.AddCssClass("bi-exclamation-circle")); builder.AppendHtml("div", div => div.InnerHtml.AppendHtml(Text)); }
public IHtmlNode CreateRow() { var tr = new HtmlElement("tr").AddClass("t-no-data"); var td = new HtmlElement("td") .Attribute("colspan", Colspan.ToString()) .AppendTo(tr); NoRecordsTemplate.Apply(td); return(tr); }
public IHtmlNode CreateRow() { var tr = new HtmlElement("tr") .Attributes(HtmlAttributes) .PrependClass(IsMasterAlternate ? UIPrimitives.Alt : "") .PrependClass("k-detail-row"); if (!Expanded) { tr.Css("display", "none"); } var td = new HtmlElement("td") .AddClass("k-detail-cell") .Attribute("colspan", Colspan.ToString()) .AppendTo(tr); AppendContent(td); return(tr); }
public void Convert(HtmlNode node, XmlWriter writer) { using (writer.StartElement(NlmGlobals.Output.TableCellNodeName)) { writer.WriteAttributeString(NlmGlobals.Output.TableCellColSepAttributeName, Colspan.ToString()); writer.WriteAttributeString(NlmGlobals.Output.TableCellRowSepAttributeName, Rowspan.ToString()); if (Rowspan > 1) { writer.WriteAttributeString("morerows", (Rowspan - 1).ToString()); } if (Colspan > 1) { writer.WriteAttributeString("namest", string.Format("col{0}", Position)); writer.WriteAttributeString("nameend", string.Format("col{0}", (Position - 1) + Colspan)); } string chartCellClass = NlmGlobals.Output.TableCellDefaultStyleClass; if (IsHeader) { chartCellClass = NlmGlobals.Output.TableCellHeaderStyleClass; } else if (IsSubHeader) { chartCellClass = NlmGlobals.Output.TableCellSubHeaderStyleClass; } using (writer.StartElement(NlmGlobals.Output.TableCellStyledContentNodeName)) { writer.WriteAttributeString(NlmGlobals.Output.TableCellStyledContentStyleAttributeName, chartCellClass); var innerContent = new TableCellContent(); innerContent.Convert(Node, writer); } } }
protected ATableCell() { Colspan = new Colspan(); Rowspan = new Rowspan(); Title = new Title(); } // constructor