private void AddEventAttributes() { if (TableDataSet.GridViewEvents.SaveOperationFinished != null) { RendererTreeBuilder.AddAttribute( nameof(ITableDataSet.GridViewEvents.SaveOperationFinished), TableDataSet.GridViewEvents.SaveOperationFinished); } if (TableDataSet.GridViewEvents.NewItemCreated != null) { RendererTreeBuilder.AddAttribute( nameof(ITableDataSet.GridViewEvents.NewItemCreated), TableDataSet.GridViewEvents.NewItemCreated); } if (TableDataSet.GridViewEvents.OnItemClicked != null) { RendererTreeBuilder.AddAttribute( nameof(ITableDataSet.GridViewEvents.OnItemClicked), TableDataSet.GridViewEvents.OnItemClicked); } if (TableDataSet.GridViewEvents.DeleteOperationFinished != null) { RendererTreeBuilder.AddAttribute( nameof(ITableDataSet.GridViewEvents.DeleteOperationFinished), TableDataSet.GridViewEvents.DeleteOperationFinished); } }
public void AddDetailGridViewComponent(ITableDataAdapter tableDataAdapter) { if (tableDataAdapter is null) { return; } var masterDetailRelationship = GridConfiguration.FindRelationshipConfiguration(tableDataAdapter.UnderlyingTypeOfItem); var pageSize = RuntimeHelpers.TypeCheck(masterDetailRelationship.DetailGridViewPageSize(TableDataSet)); RendererTreeBuilder.OpenComponent(typeof(GridViewGeneric <>).MakeGenericType(tableDataAdapter.UnderlyingTypeOfItem)); RendererTreeBuilder.AddAttribute("DataAdapter", RuntimeHelpers.TypeCheck(tableDataAdapter)); RendererTreeBuilder.AddAttribute(nameof(ITableDataSet.PageableOptions.PageSize), pageSize); RendererTreeBuilder.AddAttribute( nameof(ILazyTableDataSet.LazyLoadingOptions), new LazyLoadingOptions { DataUri = masterDetailRelationship.DetailGridLazyLoadingUrl(), PutDataUri = masterDetailRelationship.DetailGridUpdateUrl(), DeleteUri = masterDetailRelationship.DetailGridDeleteUrl() }); AddEventAttributes(); RendererTreeBuilder.CloseComponent(); }
public void AddGridViewComponent(ITableDataAdapter tableDataAdapter) { RendererTreeBuilder.OpenComponent(typeof(GridViewGroup <>).MakeGenericType(tableDataAdapter.UnderlyingTypeOfItem)); RendererTreeBuilder.AddAttribute("DataAdapter", tableDataAdapter); RendererTreeBuilder.AddAttribute(nameof(ITableDataSet.PageableOptions.PageSize), GridConfiguration.GroupingOptions.GroupPageSize); RendererTreeBuilder.CloseComponent(); }
private void AddEventAttributes() { if (TableDataSet.GridViewEvents.SaveOperationFinished != null) { RendererTreeBuilder.AddAttribute( nameof(ITableDataSet.GridViewEvents.SaveOperationFinished), RuntimeHelpers.TypeCheck(TableDataSet.GridViewEvents.SaveOperationFinished)); } }
public void AddAttribute(string name, Action <UIEventArgs> value) => RendererTreeBuilder.AddAttribute(name, value);
public void AddAttribute(string name, object value) => RendererTreeBuilder.AddAttribute(name, value);
public void AddColspan() { RendererTreeBuilder.AddAttribute(HtmlAttributes.Colspan, GridItemProperties.Count + 1); RendererTreeBuilder.AddContent(string.Empty); }
public void AddDisabled(bool disabled) => RendererTreeBuilder.AddAttribute(HtmlAttributes.Disabled, disabled);
public void AddOnChangeEvent(Func <MulticastDelegate> onClickBindMethod) => RendererTreeBuilder.AddAttribute(HtmlJSEvents.OnChange, onClickBindMethod());
public void AddHeaderStyle(string style) => RendererTreeBuilder.AddAttribute(HtmlAttributes.Style, style);
public void AddCssClass(string className) => RendererTreeBuilder.AddAttribute(HtmlAttributes.Class, className);
public void AddOnClickEvent(EventCallback <MouseEventArgs> onClickBindMethod) => RendererTreeBuilder.AddAttribute(HtmlJSEvents.OnClick, onClickBindMethod);