CreateContexts(ITableDataSet tableDataSet, RenderTreeBuilder renderTreeBuilder) { var imutableRendererContext = GetImutableGridRendererContext(tableDataSet.UnderlyingTypeOfItem()); return(new GridRendererContext(imutableRendererContext, new BlazorRendererTreeBuilder(renderTreeBuilder), tableDataSet), imutableRendererContext.PermissionContext); }
public ITableDataSet ConvertToMasterTableIfIsRequired(ITableDataSet tableDataSet) { if (tableDataSet is IMasterTableDataSet masterTableDataSet) { return(masterTableDataSet); } var tableDataSetItemType = tableDataSet.UnderlyingTypeOfItem(); var entityConfiguration = gridConfigurationProvider.GetGridConfigurationByType(tableDataSetItemType); if (!entityConfiguration.IsMasterTable) { return(tableDataSet); } var masterDetailTableDataSetType = typeof(MasterDetailTableDataSet <>).MakeGenericType(tableDataSetItemType); var masterDetailTableDataSet = Activator.CreateInstance(masterDetailTableDataSetType, new object[] { tableDataSet, gridConfigurationProvider, tableDataAdapterProvider }) as IMasterTableDataSet; return(masterDetailTableDataSet); }
public (ImutableGridRendererContext ImutableRendererContext, PermissionContext PermissionContext) CreateContexts(ITableDataSet tableDataSet) { var imutableRendererContext = GetImutableGridRendererContext(tableDataSet.UnderlyingTypeOfItem()); return(imutableRendererContext, imutableRendererContext.PermissionContext); }
public GridRendererContext CreateRendererContext(ITableDataSet tableDataSet, RenderTreeBuilder renderTreeBuilder) => new GridRendererContext( GetImutableGridRendererContext(tableDataSet.UnderlyingTypeOfItem()), renderTreeBuilder, tableDataSet);