Пример #1
0
 private RenderFragment CreateSubGridComponent(ICGrid grid) => builder =>
 {
     Type gridComponentType = typeof(GridComponent <>).MakeGenericType(grid.Type);
     builder.OpenComponent(++_sequence, gridComponentType);
     builder.AddAttribute(++_sequence, "Grid", grid);
     builder.CloseComponent();
 };
Пример #2
0
 private RenderFragment CreateSubGridComponent(ICGrid grid, VariableReference reference) => builder =>
 {
     Type gridComponentType = typeof(GridComponent <>).MakeGenericType(grid.Type);
     builder.OpenComponent(++_sequence, gridComponentType);
     builder.AddAttribute(++_sequence, "Grid", grid);
     builder.AddComponentReferenceCapture(++_sequence, r => reference.Variable = r);
     builder.CloseComponent();
 };
Пример #3
0
 public SortGridODataProcessor(ICGrid grid, IGridSortSettings settings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException("settings");
     }
     _grid     = grid;
     _settings = settings;
 }
Пример #4
0
 private RenderFragment CreateSubGridComponent(ICGrid grid, VariableReference reference) => builder =>
 {
     Type gridComponentType = typeof(GridComponent <>).MakeGenericType(grid.Type);
     builder.OpenComponent(0, gridComponentType);
     builder.AddAttribute(1, "Grid", grid);
     builder.AddAttribute(2, "UseMemoryCrudDataService", true);
     builder.AddComponentReferenceCapture(3, r => reference.Variable = r);
     builder.CloseComponent();
 };
Пример #5
0
 public FilterGridODataProcessor(ICGrid grid, IGridFilterSettings settings, IGridSearchSettings searchSettings)
 {
     if (settings == null)
     {
         throw new ArgumentNullException("settings");
     }
     _grid           = grid;
     _settings       = settings;
     _searchSettings = searchSettings;
 }
Пример #6
0
        protected override async Task OnParametersSetAsync()
        {
            _visible = GridComponent.IsSubGridVisible[GridPosition];
            _init    = GridComponent.InitSubGrid[GridPosition];

            if (_visible && (_grid == null || _init))
            {
                GridComponent.InitSubGrid[GridPosition] = false;
                _grid = await GridComponent.Grid.SubGrids(Values);

                _subGridRender = CreateSubGridComponent();
            }
        }
        protected override async Task OnParametersSetAsync()
        {
            if (GridPosition < GridComponent.IsSubGridVisible.Length &&
                GridPosition < GridComponent.InitSubGrid.Length)
            {
                _visible = GridComponent.IsSubGridVisible[GridPosition];
                _init    = GridComponent.InitSubGrid[GridPosition];

                if (_visible && (_grid == null || _init))
                {
                    GridComponent.InitSubGrid[GridPosition] = false;
                    _grid = await GridComponent.Grid.SubGrids(Values.Values.ToArray());

                    _grid.FixedValues = Values;
                    _subGridRender    = CreateSubGridComponent();
                }
            }
        }
Пример #8
0
        public HiddenGridColumn(Expression <Func <T, TDataType> > expression, ICGrid <T> grid)
        {
            _grid       = grid;
            SortEnabled = false;

            Hidden = true;

            if (expression != null)
            {
                var expr = expression.Body as MemberExpression;
                if (expr == null)
                {
                    throw new ArgumentException(
                              string.Format("Expression '{0}' must be a member expression", expression),
                              "expression");
                }

                _constraint = expression.Compile();

                Name = PropertiesHelper.BuildColumnNameFromMemberExpression(expr);
            }
        }
Пример #9
0
        internal static string GetRowStringKeys <T>(this ICGrid grid, T item)
        {
            var keys = grid.GetPrimaryKeyValues(item);

            return(string.Join('_', keys));
        }
Пример #10
0
 public ExpandGridODataProcessor(ICGrid grid)
 {
     _grid = grid;
 }
Пример #11
0
 public PagerGridODataProcessor(ICGrid grid)
 {
     _grid = grid;
 }