-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renames BlazorStrap-WASM to BlazorStrap.WASM
Renames BlazorStrap-Docs to BlazorStrap.Docs Starts work on BSDataGrid a QuickGrid like bootstrap formatted DataGrid.
- Loading branch information
Showing
1,012 changed files
with
1,227 additions
and
49 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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,16 @@ | ||
using BlazorStrap_Docs.Pages; | ||
using BlazorStrap_Docs.SamplesHelpers.Content.Tables; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace BlazorStrap_Docs; | ||
|
||
|
||
public class AppDbContext : DbContext | ||
{ | ||
public DbSet<Employee> Employees { get; set; } | ||
|
||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | ||
{ | ||
optionsBuilder.UseInMemoryDatabase("PeopleDb"); | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,94 @@ | ||
@page "/wip" | ||
@layout WipLayout | ||
@using BlazorStrap_Docs.SamplesHelpers.Content.Tables | ||
@using BlazorStrap.Shared.Components.DataGrid.Models | ||
@using BlazorStrap.V5 | ||
@using Microsoft.EntityFrameworkCore | ||
@inject AppDbContext _db | ||
|
||
|
||
@* <div class="container mt-3"> *@ | ||
@* <div class="datagrid"> *@ | ||
@* <BSDataGrid IsStriped="true" IsSmall="true" Items="_employees"> *@ | ||
@* <Columns> *@ | ||
@* <TemplateColumn Title="Id" IsSortable="true" SortField="employee => employee.Id"> *@ | ||
@* <Header> *@ | ||
@* Custom Is Custom *@ | ||
@* </Header> *@ | ||
@* <Content> *@ | ||
@* <strong>@context.Id</strong> *@ | ||
@* </Content> *@ | ||
@* </TemplateColumn> *@ | ||
@* <TemplateColumn Title="Name" IsSortable="true" SortField="employee => employee.Name" > *@ | ||
@* <Content>@context.Name</Content> *@ | ||
@* </TemplateColumn> *@ | ||
@* <TemplateColumn Title="Email"> *@ | ||
@* <Content>@context.Email</Content> *@ | ||
@* </TemplateColumn> *@ | ||
@* <TemplateColumn Title=""> *@ | ||
@* <Content> *@ | ||
@* <BSButton Color="BSColor.Danger">Delete @context.Id</BSButton> *@ | ||
@* </Content> *@ | ||
@* *@ | ||
@* </TemplateColumn> *@ | ||
@* </Columns> *@ | ||
@* </BSDataGrid> *@ | ||
@* </div> *@ | ||
@* </div> *@ | ||
|
||
<div class="container mt-3"> | ||
<div class="datagrid"> | ||
<BSDataGrid IsStriped="true" IsSmall="true" Items="_employees" IsMultiSort="true"> | ||
<Columns> | ||
<PropertyColumn Property="e => e.Id" IsSortable="true"/> | ||
<PropertyColumn Property="e => e.NameObject.FirstName" IsSortable="true"/> | ||
<PropertyColumn Property="e => e.NameObject.LastName" IsSortable="true"/> | ||
<PropertyColumn Property="e => e.Email" IsSortable="true"/> | ||
</Columns> | ||
</BSDataGrid> | ||
</div> | ||
</div> | ||
|
||
|
||
<BSButton OnClick="StateHasChanged">State Change</BSButton> | ||
|
||
@code { | ||
|
||
//This is just a auto fill class for the table for sample data. | ||
private readonly Table2Model _sampleData = new Table2Model(); | ||
IQueryable<Employee> _employees; | ||
|
||
private Func<SortData<Employee>, SortData<Employee>> _nameSort = data => | ||
{ | ||
data.Ordered = data.Descending ? data.Query.OrderByDescending(q => q.Name) : data.Query.OrderBy(q => q.Name); | ||
return data; | ||
}; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
try | ||
{ | ||
_db.Employees.AddRange(_sampleData.DataSet); | ||
_db.SaveChanges(); | ||
} | ||
catch | ||
{ | ||
} | ||
|
||
|
||
_employees = _db.Employees; | ||
} | ||
|
||
// For EF Core, use DbSet | ||
private static Func<IQueryable<Employee>, Task<int>> CountAsync() | ||
{ | ||
return query => query.CountAsync(); | ||
} | ||
|
||
private static Func<IQueryable<Employee>, Task<Employee[]>> ToArrayAsync() | ||
{ | ||
return query => query.ToArrayAsync(); | ||
} | ||
|
||
} |
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,23 @@ | ||
.datagrid { | ||
/*height: 25rem !important;*/ | ||
overflow-y: auto; | ||
} | ||
|
||
.datagrid ::deep table { | ||
} | ||
|
||
.datagrid ::deep thead { | ||
position: sticky; | ||
top:0; | ||
z-index: 1; | ||
background-color: white; | ||
border-bottom: 1px solid #ccc; | ||
} | ||
|
||
.datagrid ::deep tr { | ||
height: 30px; | ||
} | ||
|
||
.datagrid ::deep tbody td { | ||
|
||
} |
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.