Ejemplo n.º 1
0
        public static MvcHtmlString Header(Column col, OrderType? orderType)
        {
            HtmlStringBuilder sb = new HtmlStringBuilder();
            using (sb.Surround(new HtmlTag("th")
                .Attr("draggable", "true")
                .Attr("data-column-name", col.Name)
                .Attr("data-nice-name", col.Token.NiceName())))
            {
                sb.Add(new HtmlTag("span").Class("sf-header-sort")
                    .Class(orderType == null ? null :
                    orderType == OrderType.Ascending ? "asc" : "desc"));

                sb.Add(new HtmlTag("span").SetInnerText(col.DisplayName));
            }
            return sb.ToHtml();
        }
Ejemplo n.º 2
0
 void AddListViewColumn(Column col)
 {
     GridViewColumn gvc = new GridViewColumn
     {
         Header = new SortGridViewColumnHeader
         {
             Content = col.DisplayName,
             ContextMenu = headerContextMenu,
             RequestColumn = col,
         },
     };
     gvResults.Columns.Add(gvc);
 }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return(Column.ToString());
 }