-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from yagizhanNY/ag-grid
Ag grid
- Loading branch information
Showing
12 changed files
with
5,326 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@using Microsoft.JSInterop; | ||
@inherits IXBaseComponent | ||
@inject IJSRuntime JSRuntime | ||
|
||
<div | ||
@attributes="UserAttributes" | ||
id="@Id" | ||
class="@Class" | ||
style="@Style"> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.JSInterop; | ||
using Newtonsoft.Json; | ||
|
||
namespace SiemensIXBlazor.Components.AGGrid | ||
{ | ||
public partial class AGGrid | ||
{ | ||
[Parameter, EditorRequired] | ||
public string Id { get; set; } = string.Empty; | ||
|
||
public async Task CreateGrid(GridOptions options) | ||
{ | ||
if (Id == string.Empty) | ||
{ | ||
return; | ||
} | ||
|
||
await JSRuntime.InvokeVoidAsync("agGridInterop.createGrid", Id, JsonConvert.SerializeObject(options)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace SiemensIXBlazor.Components.AGGrid | ||
{ | ||
public class ColumnDefs | ||
{ | ||
[JsonProperty("field")] | ||
public string? Field { get; set; } | ||
[JsonProperty("headerName")] | ||
public string? HeaderName { get; set; } | ||
[JsonProperty("resizable")] | ||
public bool? Resizable { get; set; } | ||
[JsonProperty("checkboxSelection")] | ||
public bool? CheckboxSelection { get; set; } | ||
[JsonProperty("sortable")] | ||
public bool? Sortable { get; set; } | ||
[JsonProperty("filter")] | ||
public bool? Filter { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace SiemensIXBlazor.Components.AGGrid | ||
{ | ||
public class GridOptions | ||
{ | ||
[JsonProperty("columnDefs")] | ||
public List<ColumnDefs>? ColumnDefs { get; set; } | ||
[JsonProperty("rowData")] | ||
public List<Dictionary<string, dynamic>>? RowData { get; set; } | ||
[JsonProperty("rowSelection")] | ||
public string? RowSelection { get; set; } | ||
[JsonProperty("suppressCellFocus")] | ||
public bool? SuppressCellFocus { get; set; } | ||
[JsonProperty("checkboxSelection")] | ||
public bool? CheckboxSelection { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.