-
Notifications
You must be signed in to change notification settings - Fork 10
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 #707 from IgniteUI/ikitanov/tgrid-row-drag-base
Add tgrid row-drag-base custom sample
- Loading branch information
Showing
11 changed files
with
724 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
@using IgniteUI.Blazor.Controls | ||
|
||
<div class="container vertical ig-typography"> | ||
<div class="container horizontal fill"> | ||
<div class="container vertical" style="padding: 0.5rem;"> | ||
<IgbTreeGrid | ||
AutoGenerate="false" | ||
Name="treeGrid" | ||
@ref="treeGrid" | ||
Id="treeGrid" | ||
Data="EmployeesNestedData" | ||
ChildDataKey="Employees" | ||
RowDraggable=true | ||
RowDragEndScript="OnRowDragEndHandler" | ||
Width="100%" | ||
Height="100%" | ||
> | ||
<IgbColumn | ||
Field="Name" | ||
Header="Name" | ||
DataType="GridColumnDataType.String" | ||
Sortable="true" | ||
Editable="true" | ||
> | ||
</IgbColumn> | ||
|
||
<IgbColumn | ||
Field="HireDate" | ||
Header="Hire Date" | ||
DataType="GridColumnDataType.Date" | ||
Sortable="true" | ||
> | ||
</IgbColumn> | ||
|
||
<IgbColumn | ||
Field="Age" | ||
Header="Age" | ||
DataType="GridColumnDataType.Number" | ||
Sortable="true" | ||
> | ||
</IgbColumn> | ||
</IgbTreeGrid> | ||
</div> | ||
<div class="container vertical" style="padding: 0.5rem;"> | ||
<IgbTreeGrid AutoGenerate="false" | ||
Name="treeGrid2" | ||
@ref="treeGrid2" | ||
Id="treeGrid2" | ||
Data="Data2" | ||
EmptyGridMessage="Drag and Drop a row from the left grid to this grid" | ||
ChildDataKey="Employees" | ||
Width="100%" | ||
Height="100%" | ||
> | ||
<IgbColumn Field="Name" | ||
Header="Name" | ||
DataType="GridColumnDataType.String" | ||
Sortable="true" | ||
Editable="true" | ||
> | ||
</IgbColumn> | ||
|
||
<IgbColumn Field="HireDate" | ||
Header="Hire Date" | ||
DataType="GridColumnDataType.Date" | ||
Sortable="true" | ||
> | ||
</IgbColumn> | ||
|
||
<IgbColumn Field="Age" | ||
Header="Age" | ||
DataType="GridColumnDataType.Number" | ||
Sortable="true" | ||
> | ||
</IgbColumn> | ||
</IgbTreeGrid> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@code { | ||
|
||
protected override async Task OnAfterRenderAsync(bool firstRender) | ||
{ | ||
var treeGrid = this.treeGrid; | ||
var treeGrid2 = this.treeGrid2; | ||
|
||
} | ||
|
||
protected override void OnInitialized() | ||
{ | ||
this.Data2 = new List<EmployeesNestedDataItem_EmployeesItem>() { }; | ||
} | ||
|
||
private IgbTreeGrid treeGrid; | ||
private IgbTreeGrid treeGrid2; | ||
|
||
private List<EmployeesNestedDataItem_EmployeesItem> Data2 { get; set; } | ||
|
||
private EmployeesNestedData _employeesNestedData = null; | ||
public EmployeesNestedData EmployeesNestedData | ||
{ | ||
get | ||
{ | ||
if (_employeesNestedData == null) | ||
{ | ||
_employeesNestedData = new EmployeesNestedData(); | ||
} | ||
return _employeesNestedData; | ||
} | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
samples/grids/tree-grid/row-drag-base/BlazorClientApp.csproj
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,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
<AssemblyName>Infragistics.Samples</AssemblyName> | ||
<RootNamespace>Infragistics.Samples</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<NoWarn>1701;1702,IDE0028,BL0005,0219,CS1998</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="IgniteUI.Blazor" Version="23.2.218" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" /> | ||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.29613.14 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.