From dfa16cd8b3934921d47f726baf8145d822c75f7a Mon Sep 17 00:00:00 2001 From: Maya Kirova Date: Mon, 24 Apr 2023 17:55:06 +0300 Subject: [PATCH 01/65] Add simpler editor that work for clipboard sample. --- .../grids/grid/clipboard-operations/App.razor | 87 +++---------------- .../grid/clipboard-operations/Program.cs | 5 +- .../clipboard-operations/wwwroot/events.js | 26 ++++-- 3 files changed, 35 insertions(+), 83 deletions(-) diff --git a/samples/grids/grid/clipboard-operations/App.razor b/samples/grids/grid/clipboard-operations/App.razor index c0db30f324..c7a13f3cb8 100644 --- a/samples/grids/grid/clipboard-operations/App.razor +++ b/samples/grids/grid/clipboard-operations/App.razor @@ -3,62 +3,21 @@ @inject IJSRuntime JS
-
- - - - - - - - - - - - - - - - - - +
+ + Change copy separator: + The default value is a single tabulation. + + Grid copy behavior + Copying of header labels + Copying column formatters + Clear Selection
@code { - - private Action BindElements { get; set; } - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - var propertyEditor = this.propertyEditor; - var clipboardEnabledEditor = this.clipboardEnabledEditor; - var clipboardHeadersEditor = this.clipboardHeadersEditor; - var clipboardFormattersEditor = this.clipboardFormattersEditor; - var propertyEditorPropertyDescription1 = this.propertyEditorPropertyDescription1; - var grid = this.grid; - - this.BindElements = () => { - propertyEditor.Target = this.grid; - }; - this.BindElements(); - - } - - private IgbPropertyEditorPanel propertyEditor; - private IgbPropertyEditorPropertyDescription clipboardEnabledEditor; - private IgbPropertyEditorPropertyDescription clipboardHeadersEditor; - private IgbPropertyEditorPropertyDescription clipboardFormattersEditor; - private IgbPropertyEditorPropertyDescription propertyEditorPropertyDescription1; private IgbGrid grid; - private NwindData _nwindData = null; + public NwindData NwindData { get diff --git a/samples/grids/grid/clipboard-operations/Program.cs b/samples/grids/grid/clipboard-operations/Program.cs index 009d58a6d8..72c2f1a33d 100644 --- a/samples/grids/grid/clipboard-operations/Program.cs +++ b/samples/grids/grid/clipboard-operations/Program.cs @@ -21,8 +21,9 @@ public static async Task Main(string[] args) // registering Ignite UI modules builder.Services.AddIgniteUIBlazor( typeof(IgbInputModule), - typeof(IgbPropertyEditorPanelModule), - typeof(IgbGridModule) + typeof(IgbGridModule), + typeof(IgbSwitchModule), + typeof(IgbButtonModule) ); await builder.Build().RunAsync(); } diff --git a/samples/grids/grid/clipboard-operations/wwwroot/events.js b/samples/grids/grid/clipboard-operations/wwwroot/events.js index 58e2f4454f..f36f89c9d4 100644 --- a/samples/grids/grid/clipboard-operations/wwwroot/events.js +++ b/samples/grids/grid/clipboard-operations/wwwroot/events.js @@ -1,12 +1,28 @@ +function toggleClipboardOperations() { + grid.clipboardOptions.enabled = copyEnable.checked; +} + +function toggleHeaderCopy() { + grid.clipboardOptions.copyHeaders = headerCopy.checked; +} + +function toggleFormatterCopy() { + grid.clipboardOptions.copyFormatters = formatterCopy.checked; +} + +function clearSelection() { + grid.cellSelection = 'none'; + grid.cellSelection = 'multiple'; +} + +function inputChange() { + grid.clipboardOptions.separator = input.value; +} -igRegisterScript("WebGridClearSelection", (event) => { - console.log("TODO WebGridClearSelection"); -}, false); igRegisterScript("WebGridClipboardOperationsColumnInit", (e) => { var column = e.detail; - column.formatter = columnFormatter; + column.formatter = (e) => { return "** " + e + " **" }; column.header = "🎉" + column.field; }, false); - From d0645509b61f10754acf6f73197a87394fced2d0 Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Tue, 2 May 2023 15:16:58 +0300 Subject: [PATCH 02/65] Add styling sample for multi column headers --- .../tasks/gulp-samples.js | 1 - .../multi-column-header-template/App.razor | 3 +- .../MultiColumnHeaderTemplateEvents.js | 2 +- .../multi-column-headers-styling/App.razor | 134 ++++++ .../BlazorClientApp.csproj | 21 + .../BlazorClientApp.sln | 25 ++ .../CustomersData.cs | 402 ++++++++++++++++++ .../multi-column-headers-styling/Program.cs | 31 ++ .../Properties/launchSettings.json | 27 ++ .../multi-column-headers-styling/ReadMe.md | 67 +++ .../_Imports.razor | 9 + .../wwwroot/index.css | 4 + .../wwwroot/index.html | 31 ++ 13 files changed, 754 insertions(+), 3 deletions(-) create mode 100644 samples/grids/grid/multi-column-headers-styling/App.razor create mode 100644 samples/grids/grid/multi-column-headers-styling/BlazorClientApp.csproj create mode 100644 samples/grids/grid/multi-column-headers-styling/BlazorClientApp.sln create mode 100644 samples/grids/grid/multi-column-headers-styling/CustomersData.cs create mode 100644 samples/grids/grid/multi-column-headers-styling/Program.cs create mode 100644 samples/grids/grid/multi-column-headers-styling/Properties/launchSettings.json create mode 100644 samples/grids/grid/multi-column-headers-styling/ReadMe.md create mode 100644 samples/grids/grid/multi-column-headers-styling/_Imports.razor create mode 100644 samples/grids/grid/multi-column-headers-styling/wwwroot/index.css create mode 100644 samples/grids/grid/multi-column-headers-styling/wwwroot/index.html diff --git a/browser/IgBlazorSamples.Gulp/tasks/gulp-samples.js b/browser/IgBlazorSamples.Gulp/tasks/gulp-samples.js index 020fa0fa23..fd31e24fea 100644 --- a/browser/IgBlazorSamples.Gulp/tasks/gulp-samples.js +++ b/browser/IgBlazorSamples.Gulp/tasks/gulp-samples.js @@ -171,7 +171,6 @@ function getSamples(cb) { igConfig.SamplesCopyPath + '/grids/grid/filtering-style/App.razor', igConfig.SamplesCopyPath + '/grids/grid/filtering-template/App.razor', igConfig.SamplesCopyPath + '/grids/grid/keyboard-custom-navigation/App.razor', - igConfig.SamplesCopyPath + '/grids/grid/multi-column-headers-styling/App.razor', igConfig.SamplesCopyPath + '/grids/grid/remote-filtering-data/App.razor', igConfig.SamplesCopyPath + '/grids/grid/remote-paging-batch-editing/App.razor', igConfig.SamplesCopyPath + '/grids/grid/remote-paging-custom/App.razor', diff --git a/samples/grids/grid/multi-column-header-template/App.razor b/samples/grids/grid/multi-column-header-template/App.razor index 788143769a..30de5a569c 100644 --- a/samples/grids/grid/multi-column-header-template/App.razor +++ b/samples/grids/grid/multi-column-header-template/App.razor @@ -32,7 +32,8 @@ -