-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RadzenTableHeader, RadzenTableHeaderRow and RadzenTableBody added
- Loading branch information
Showing
11 changed files
with
205 additions
and
45 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,9 @@ | ||
@inherits RadzenComponentWithChildren | ||
@if (Visible) | ||
{ | ||
<tbody @ref="@Element" style="@Style" @attributes="Attributes" class="@GetCssClass()" id="@GetId()"> | ||
<CascadingValue Value=this> | ||
@ChildContent | ||
</CascadingValue> | ||
</tbody> | ||
} |
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,39 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using System.Collections.Generic; | ||
|
||
namespace Radzen.Blazor | ||
{ | ||
/// <summary> | ||
/// RadzenTableBody component. | ||
/// </summary> | ||
public partial class RadzenTableBody : RadzenComponentWithChildren | ||
{ | ||
List<RadzenTableRow> rows = new List<RadzenTableRow>(); | ||
|
||
/// <summary> | ||
/// Adds the row. | ||
/// </summary> | ||
/// <param name="row">The row.</param> | ||
public void AddRow(RadzenTableRow row) | ||
{ | ||
if (rows.IndexOf(row) == -1) | ||
{ | ||
rows.Add(row); | ||
StateHasChanged(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Removes the row. | ||
/// </summary> | ||
/// <param name="row">The row.</param> | ||
public void RemoveRow(RadzenTableRow row) | ||
{ | ||
if (rows.IndexOf(row) != -1) | ||
{ | ||
rows.Remove(row); | ||
StateHasChanged(); | ||
} | ||
} | ||
} | ||
} |
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,9 @@ | ||
@inherits RadzenComponentWithChildren | ||
@if (Visible) | ||
{ | ||
<thead @ref="@Element" style="@Style" @attributes="Attributes" class="@GetCssClass()" id="@GetId()"> | ||
<CascadingValue Value=this> | ||
@ChildContent | ||
</CascadingValue> | ||
</thead> | ||
} |
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,39 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using System.Collections.Generic; | ||
|
||
namespace Radzen.Blazor | ||
{ | ||
/// <summary> | ||
/// RadzenTableHeader component. | ||
/// </summary> | ||
public partial class RadzenTableHeader : RadzenComponentWithChildren | ||
{ | ||
List<RadzenTableHeaderRow> rows = new List<RadzenTableHeaderRow>(); | ||
|
||
/// <summary> | ||
/// Adds the row. | ||
/// </summary> | ||
/// <param name="row">The row.</param> | ||
public void AddRow(RadzenTableHeaderRow row) | ||
{ | ||
if (rows.IndexOf(row) == -1) | ||
{ | ||
rows.Add(row); | ||
StateHasChanged(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Removes the row. | ||
/// </summary> | ||
/// <param name="row">The row.</param> | ||
public void RemoveRow(RadzenTableHeaderRow row) | ||
{ | ||
if (rows.IndexOf(row) != -1) | ||
{ | ||
rows.Remove(row); | ||
StateHasChanged(); | ||
} | ||
} | ||
} | ||
} |
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
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,9 @@ | ||
@inherits RadzenComponentWithChildren | ||
@if (Visible) | ||
{ | ||
<tr @ref="@Element" style="@Style" @attributes="Attributes" class="@GetCssClass()" id="@GetId()"> | ||
<CascadingValue Value=this> | ||
@ChildContent | ||
</CascadingValue> | ||
</tr> | ||
} |
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,62 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using System.Collections.Generic; | ||
|
||
namespace Radzen.Blazor | ||
{ | ||
/// <summary> | ||
/// RadzenTableRow component. | ||
/// </summary> | ||
public partial class RadzenTableHeaderRow : RadzenComponentWithChildren | ||
{ | ||
RadzenTableHeader _header; | ||
|
||
/// <summary> | ||
/// Gets or sets the table body. | ||
/// </summary> | ||
/// <value>The table body.</value> | ||
[CascadingParameter] | ||
public RadzenTableHeader Header | ||
{ | ||
get | ||
{ | ||
return _header; | ||
} | ||
set | ||
{ | ||
if (_header != value) | ||
{ | ||
_header = value; | ||
_header.AddRow(this); | ||
} | ||
} | ||
} | ||
|
||
List<RadzenTableHeaderCell> cells = new List<RadzenTableHeaderCell>(); | ||
|
||
/// <summary> | ||
/// Adds the cell. | ||
/// </summary> | ||
/// <param name="cell">The cell.</param> | ||
public void AddCell(RadzenTableHeaderCell cell) | ||
{ | ||
if (cells.IndexOf(cell) == -1) | ||
{ | ||
cells.Add(cell); | ||
StateHasChanged(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Removes the cell. | ||
/// </summary> | ||
/// <param name="cell">The cell.</param> | ||
public void RemoveCell(RadzenTableHeaderCell cell) | ||
{ | ||
if (cells.IndexOf(cell) != -1) | ||
{ | ||
cells.Remove(cell); | ||
StateHasChanged(); | ||
} | ||
} | ||
} | ||
} |
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