public GridRendererContext( ImutableGridRendererContext imutableGridRendererContext, IRendererTreeBuilder rendererTreeBuilder, ITableDataSet tableDataSet, ISpecialColumnFragmentsCollection specialColumnFragmentsCollection, FlexGridContext flexGridContext) { if (imutableGridRendererContext is null) { throw new ArgumentNullException(nameof(imutableGridRendererContext)); } RendererTreeBuilder = rendererTreeBuilder ?? throw new ArgumentNullException(nameof(RendererTreeBuilder)); TableDataSet = tableDataSet ?? throw new ArgumentNullException(nameof(tableDataSet)); FlexGridContext = flexGridContext ?? throw new ArgumentNullException(nameof(flexGridContext)); GridConfiguration = imutableGridRendererContext.GridConfiguration; GridItemProperties = imutableGridRendererContext.GridItemProperties; GridItemCollectionProperties = imutableGridRendererContext.GridEntityConfiguration.ClrTypeCollectionProperties; CssClasses = imutableGridRendererContext.CssClasses; PropertyValueAccessor = imutableGridRendererContext.GetPropertyValueAccessor; gridEntityConfiguration = imutableGridRendererContext.GridEntityConfiguration; valueFormatters = imutableGridRendererContext.ValueFormatters; columnRendererFragments = specialColumnFragmentsCollection .Merge(gridEntityConfiguration, imutableGridRendererContext.ColumnRendererFragments); columnEditRendererBuilders = specialColumnFragmentsCollection .Merge(gridEntityConfiguration, imutableGridRendererContext.ColumnEditRendererBuilders); firstColumnName = GridItemProperties.First().Name; lastColumnName = GridItemProperties.Last().Name; NumberOfColumns = GridItemProperties.Count + (imutableGridRendererContext.InlineEditItemIsAllowed() || imutableGridRendererContext.CreateItemIsAllowed() ? 1 : 0) + (GridConfiguration.IsMasterTable ? 1 : 0); }
public GridRendererContext( ImutableGridRendererContext imutableGridRendererContext, IRendererTreeBuilder rendererTreeBuilder, ITableDataSet tableDataSet) { if (imutableGridRendererContext is null) { throw new ArgumentNullException(nameof(imutableGridRendererContext)); } GridConfiguration = imutableGridRendererContext.GridConfiguration; GridItemProperties = imutableGridRendererContext.GridItemProperties; GridItemCollectionProperties = imutableGridRendererContext.GridEntityConfiguration.ClrTypeCollectionProperties; CssClasses = imutableGridRendererContext.CssClasses; PropertyValueAccessor = imutableGridRendererContext.GetPropertyValueAccessor; RendererTreeBuilder = rendererTreeBuilder ?? throw new ArgumentNullException(nameof(RendererTreeBuilder)); RequestRerenderNotification = imutableGridRendererContext.RequestRerenderNotification; TableDataSet = tableDataSet ?? throw new ArgumentNullException(nameof(tableDataSet)); TableDataSet.GroupingOptions.SetConfiguration(GridConfiguration?.GroupingOptions); TableDataSet.GroupingOptions.GroupableProperties = this.GridItemProperties.ToList(); this.gridEntityConfiguration = imutableGridRendererContext.GridEntityConfiguration; this.valueFormatters = imutableGridRendererContext.ValueFormatters; this.specialColumnValues = imutableGridRendererContext.SpecialColumnValues; this.firstColumnName = GridItemProperties.First().Name; this.lastColumnName = GridItemProperties.Last().Name; }
public GridRendererContext( ImutableGridRendererContext imutableGridRendererContext, RenderTreeBuilder renderTreeBuilder, ITableDataSet tableDataSet) { if (imutableGridRendererContext is null) { throw new ArgumentNullException(nameof(imutableGridRendererContext)); } GridConfiguration = new GridAnotations(imutableGridRendererContext.GridEntityConfiguration); GridItemProperties = imutableGridRendererContext.GridItemProperties; GridItemCollectionProperties = imutableGridRendererContext.GridEntityConfiguration.ClrTypeCollectionProperties; CssClasses = GridConfiguration.CssClasses; TableDataSet = tableDataSet ?? throw new ArgumentNullException(nameof(tableDataSet)); PropertyValueAccessor = imutableGridRendererContext.GetPropertyValueAccessor; this.gridEntityConfiguration = imutableGridRendererContext.GridEntityConfiguration; this.valueFormatters = imutableGridRendererContext.ValueFormatters; this.specialColumnValues = imutableGridRendererContext.SpecialColumnValues; this.renderTreeBuilder = renderTreeBuilder ?? throw new ArgumentNullException(nameof(renderTreeBuilder)); this.firstColumnName = GridItemProperties.First().Name; this.lastColumnName = GridItemProperties.Last().Name; }