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
@page "/grid/templates" | |
@using TelerikBlazor.App.Models | |
@inject NorthwindContext nwContext | |
<h4> Row Template </h4> | |
<KendoGrid Data=@GridData Height="@Height"> | |
<RowTemplate Context="product"> | |
@if (selectedId == product.ProductId) |
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
<li aria-selected=@IsActive role="tab" class="@ClassToRender"> | |
... | |
</li> | |
@functions { | |
... | |
protected bool IsActive => ContainerTabSet.ActiveTab == this; | |
[Parameter] protected bool Disabled { get; set; } | |
[Parameter] protected string Class { 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
public static string SplitUpperCaseToString(this string source) { | |
return string.Join(" ", SplitUpperCase(source)); | |
} | |
public static string[] SplitUpperCase(this string source) { | |
if (source == null) { | |
return new string[] {}; //Return empty array. | |
} | |
if (source.Length == 0) { | |
return new string[] {""}; |
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
Microsoft Visual Studio Enterprise 2019 Preview | |
Version 16.0.0 Preview 2.2 | |
VisualStudio.16.Preview/16.0.0-pre.2.2+28602.52 | |
Microsoft .NET Framework | |
Version 4.7.03056 | |
Installed Version: Enterprise | |
Application Insights Tools for Visual Studio Package 9.0.11128.2 | |
Application Insights Tools for Visual Studio |
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
@page "/" | |
<KendoGrid Data=@Orders Pageable=true Sortable=true> | |
<KendoGridColumn Field=@nameof(OrderViewModel.OrderID)> | |
<Template> | |
@{ | |
var item = context as OrderViewModel; | |
<KendoButton OnButtonClick=@(()=> HandleDelete(item))>Delete</KendoButton> | |
} | |
</Template> |
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
@functions { | |
public class OrderViewModel | |
{ | |
public int OrderID { get; set; } | |
public decimal? Freight { get; set; } | |
public DateTime? OrderDate { get; set; } | |
public string ShipCity { 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
<!-- Choose one below --> | |
<!-- <link href="css/kendo-default/dist/all.css" rel="stylesheet" /> | |
<link href="css/kendo-material/dist/all.css" rel="stylesheet" /> --> | |
<link href="css/kendo-bootstrap/dist/all.css" rel="stylesheet" /> |
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
<select onchange=@HandleThemeChange> | |
@foreach (var t in themes) | |
{ | |
<option value=@t>@t</option> | |
} | |
</select> | |
@functions { | |
string[] themes = { "Default", "Bootstrap", "Material" }; |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<Folder Include="css\" /> | |
<Folder Include="wwwroot\" /> | |
</ItemGroup> |
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
using Microsoft.AspNetCore.Blazor.Server; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.ResponseCompression; | |
using Microsoft.Extensions.DependencyInjection; | |
using Newtonsoft.Json.Serialization; | |
using StateHasChanged4.Server.Models; | |
using System.Linq; | |
using System.Net.Mime; | |
using Microsoft.EntityFrameworkCore; |