public GridModel(IQueryable <T> source, ViewDataDictionary viewData, ViewContext viewContext, ControllerContext controllerContext, TempDataDictionary tempData = null) { source_ = source; tempData_ = tempData; Context = controllerContext; viewContext_ = viewContext; ViewData = viewData; GridType = typeof(T); Ordering = new Ordering(Context.HttpContext.Request.QueryString[GridParameters.OrderKey], GridType); Pagination = new Pagination <T>(source_, this); ColumnList = new List <GridColumnBase <T> >(); HiddenColumns = new List <GridColumnBase <T> >(); DataKeys = new List <IGridDataKey <T> >(); Width = GridParameters.GridDefaultWidth; ToolBar = new GridToolBar <T>(this); ViewModelType = viewData.Model != null?viewData.Model.GetType() : null; FormAction = Context.HttpContext.Request.RawUrl; HasModelStateErrors = viewData.HasModelStateErrors(); HasForm = true; }
public ToolBarRenderer(GridToolBar <T> toolBar, int colspan) { gridToolBar_ = toolBar; colspan_ = colspan; }
public GridToolBarCommandFactory(GridToolBar <T> toolBar, ControllerContext context) { Context = context; ToolBar = toolBar; }