public Grid(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator, IGridHtmlBuilderFactory htmlBuilderFactory) : base(viewContext, initializer) { this.htmlBuilderFactory = htmlBuilderFactory; UrlGenerator = urlGenerator; PrefixUrlParameters = true; RowTemplate = new HtmlTemplate <T>(); DetailTemplate = new HtmlTemplate <T>(); Columns = new List <GridColumnBase <T> >(); DataKeys = new List <IDataKey>(); Pageable = new PageableSettings(); Sortable = new GridSortableSettings(); Scrollable = new GridScrollableSettings(); Navigatable = new GridNavigatableSettings(this); Filterable = new GridFilterableSettings(); ColumnMenu = new GridColumnMenuSettings(); Editable = new GridEditableSettings <T>(this) { PopUp = new Window(viewContext, Initializer) { Modal = true, Draggable = true } }; Grouping = new GridGroupableSettings(); Resizable = new GridResizableSettings(); Reorderable = new GridReorderableSettings(); TableHtmlAttributes = new RouteValueDictionary(); IsEmpty = true; Selectable = new GridSelectableSettings(); ToolBar = new GridToolBarSettings <T>(this); NoRecordsTemplate = new HtmlTemplate(); ValidationMetadata = new Dictionary <string, object>(); AutoGenerateColumns = true; DataSource = new DataSource() { Type = DataSourceType.Server, ServerAggregates = true, ServerFiltering = true, ServerGrouping = true, ServerPaging = true, ServerSorting = true }; DataSource.ModelType(typeof(T)); }
public ListView(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { UrlGenerator = urlGenerator; Pageable = new PageableSettings(); Selectable = new ListViewSelectionSettings(); Editable = new ListViewEditingSettings <T>(); settingsSerializer = new ListViewSettingsSerializer <T>(this); DataSource = new DataSource() { Type = DataSourceType.Ajax, ServerAggregates = true, ServerFiltering = true, ServerGrouping = true, ServerPaging = true, ServerSorting = true }; DataSource.ModelType(typeof(T)); }
/// <summary> /// Initializes a new instance of the <see cref="ChartNavigator{T}" /> class. /// </summary> public ChartNavigator(ViewContext viewContext, IUrlGenerator urlGenerator) { Series = new List <IChartSeries>(); Select = new ChartDateSelection(); Hint = new ChartNavigatorHint(); UrlGenerator = urlGenerator; ViewContext = viewContext; DataSource = new DataSource(); DataSource.Schema.Data = ""; DataSource.Schema.Total = ""; DataSource.Schema.Errors = ""; DataSource.ModelType(typeof(T)); }
public MobileListView(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { UrlGenerator = urlGenerator; Filterable = new MobileListViewFilterableSettings(); DataSource = new DataSource() { Type = DataSourceType.Ajax, ServerAggregates = true, ServerFiltering = true, ServerGrouping = true, ServerPaging = true, ServerSorting = true }; DataSource.ModelType(typeof(T)); Items = new List <MobileListViewItemBase>(); }
public Chart(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator) : base(viewContext, initializer) { UrlGenerator = urlGenerator; Title = new ChartTitle(); ChartArea = new ChartArea(); PlotArea = new PlotArea(); Legend = new ChartLegend(); Series = new List <IChartSeries>(); Panes = new List <ChartPane>(); CategoryAxes = new List <IChartCategoryAxis>(); ValueAxes = new List <IChartValueAxis>(); XAxes = new List <IChartValueAxis>(); YAxes = new List <IChartValueAxis>(); SeriesDefaults = new ChartSeriesDefaults <T>(); AxisDefaults = new ChartAxisDefaults <T>(this); Tooltip = new ChartTooltip(); Transitions = true; DataSource = new DataSource(); DataSource.Schema.Data = ""; DataSource.Schema.Total = ""; DataSource.Schema.Errors = ""; DataSource.ModelType(typeof(T)); }