Exemplo n.º 1
0
 private void Initialize(string name, string href, bool autoGenerateColumns, bool hasFooter,
                         IEnumerable <int> pageSizes, GridTheme theme)
 {
     if (theme == null)
     {
         theme = DefaulTheme;
     }
     Theme = theme;
     Class = Theme.Table;
     Id    = name;
     Href  = href;
     AutoGenerateColumns = autoGenerateColumns;
     Header = new TableHeader();
     Body   = new TableBody();
     if (hasFooter)
     {
         Footer = new TableFooter();
     }
     DefaultText = "No data found.";
     PageDisplay = "page {0} of {1}";
     if (pageSizes == null)
     {
         pageSizes = new List <int> {
             10, 20, 50
         };
     }
     _pageSizes = pageSizes;
     InitColumns();
     InitCommands();
     InitBody();
 }
Exemplo n.º 2
0
 public DataGrid(string name, string href, bool autoGenerateColumns = true, bool hasFooter = true,
                 IEnumerable <int> pageSizes = null, GridTheme theme = null,
                 HtmlParsingMode parsingMode = HtmlParsingMode.Auto, HtmlParsingOptions parsingOptions = HtmlParsingOptions.Default, DocType docType = DocType.Default)
     : base(parsingMode, parsingOptions, docType)
 {
     Initialize(name, href, autoGenerateColumns, hasFooter, pageSizes, theme);
 }