public override void Content(object value, ItemCollectionAttribute itemInfo, List <HtmlTableCell> cellsCollection) { HtmlTableCell cell = new HtmlTableCell { InnerHtml = value.ToString() }; cell.Attributes["order"] = itemInfo.Order.ToString(); cell.Attributes["style"] = itemInfo.Style; cell.Attributes["class"] = itemInfo.CssClass; cellsCollection.Add(cell); if (itemInfo.Filtered) { HtmlInputHidden hidden = new HtmlInputHidden(); hidden.Attributes["target"] = "search-terms"; hidden.Value = value.ToString(); cell.Controls.Add(hidden); } }
public override void Content(string value, ItemCollectionAttribute itemInfo, List <HtmlTableCell> cellsCollection) { HtmlGenericControl subTitle = new HtmlGenericControl("span"); subTitle.Attributes["style"] = itemInfo.Style; subTitle.Attributes["class"] = value; HtmlTableCell tableCell = cellsCollection.LastOrDefault(cell => cell.Attributes["order"] == itemInfo.Order.ToString()); if (tableCell != null) { tableCell.Controls.Add(subTitle); tableCell.Attributes["class"] = String.Format("{0} {1}", tableCell.Attributes["class"], itemInfo.CssClass).Trim(); } else { HtmlTableCell cell = new HtmlTableCell { InnerHtml = itemInfo.Text }; cell.Attributes["order"] = itemInfo.Order.ToString(); cell.Attributes["class"] = itemInfo.CssClass; cell.Controls.Add(subTitle); cellsCollection.Add(cell); } }
public static void DrawContent(string value, ItemCollectionAttribute itemInfo, List<HtmlTableCell> cellsCollection) { LayoutFactory layoutFactory = GetLayoutFactory(itemInfo.Region); if (layoutFactory != null) layoutFactory.Content(value, itemInfo, cellsCollection); }
public static void DrawHeader(ItemCollectionAttribute itemInfo,List<HtmlTableCell> cellsCollection) { LayoutFactory layoutFactory = GetLayoutFactory(itemInfo.Region); if (layoutFactory != null) layoutFactory.Header(itemInfo, cellsCollection); }
public abstract void Content(string value, ItemCollectionAttribute itemInfo,List<HtmlTableCell> cellsCollection);
public abstract void Header(ItemCollectionAttribute itemInfo,List<HtmlTableCell> cellsCollection);