Skip to content

Commit

Permalink
Adding changes from build igniteui-xplat-examples-output+PRs_2023.12.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsbuild committed Dec 6, 2023
1 parent 7ac211a commit 8bf27f9
Show file tree
Hide file tree
Showing 30 changed files with 1,997 additions and 33 deletions.
31 changes: 15 additions & 16 deletions samples/grids/grid/conditional-row-selectors/wwwroot/events.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@


igRegisterScript("WebGridRowSelectionConditional", (event) => {
const eventArgs = event.detail;
if (!eventArgs.added.length && eventArgs.removed.length) {
// ignore deselect
return;
}
const originalAddedLength = eventArgs.added.length;
const eventArgs = event.detail;
if (!eventArgs.added.length && eventArgs.removed.length) {
// ignore deselect
return;
}
const originalAddedLength = eventArgs.added.length;

// only allow selection of items that contain 'A'
eventArgs.newSelection = eventArgs.newSelection.filter(x => x.indexOf('A') !== -1);
// only allow selection of items that contain 'A'
eventArgs.newSelection = eventArgs.newSelection.filter(x => x["ID"].indexOf("A") !== -1);

// cleanup selection if all conditionally selectable rows are already selected
if (eventArgs.newSelection.length
&& !eventArgs.newSelection.filter(x => eventArgs.oldSelection.indexOf(x) === -1).length
&& originalAddedLength > 1) {
// all selected from header, deselect instead
eventArgs.newSelection = [];
}
grid.markForCheck();
// cleanup selection if all conditionally selectable rows are already selected
if (eventArgs.newSelection.length
&& !eventArgs.newSelection.filter(x => eventArgs.oldSelection.indexOf(x) === -1).length
&& originalAddedLength > 1) {
// all selected from header, deselect instead
eventArgs.newSelection = [];
}
}, false);

159 changes: 159 additions & 0 deletions samples/grids/tree-grid/column-sorting-indicators/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
@using IgniteUI.Blazor.Controls

<div class="container vertical ig-typography">
<div class="container vertical fill">
<IgbTreeGrid
AutoGenerate="false"
Data="OrdersTreeData"
Name="grid"
@ref="grid"
SortingExpressions="SortingExpression1"
Id="grid"
PrimaryKey="ID"
ForeignKey="ParentID">
<IgbColumn
Field="ID"
Header="Order ID"
Groupable="true"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="Name"
Header="Name"
DataType="GridColumnDataType.String"
Groupable="true"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="Category"
Header="Category"
DataType="GridColumnDataType.String"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="OrderDate"
Header="Order Date"
DataType="GridColumnDataType.Date"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="Price"
DataType="GridColumnDataType.Currency"
Sortable="true"
PipeArgs="ColumnPipeArgs1"
Name="column1"
@ref="column1">
</IgbColumn>

<IgbColumn
Field="Units"
Header="Units"
DataType="GridColumnDataType.Number"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="Delivered"
Header="Units"
DataType="GridColumnDataType.Boolean"
Sortable="true">
</IgbColumn>

</IgbTreeGrid>

</div>
</div>

@code {

protected override async Task OnAfterRenderAsync(bool firstRender)
{
var grid = this.grid;
var column1 = this.column1;

}

private IgbTreeGrid grid;
private IgbSortingExpression[] _sortingExpression1 = null;
public IgbSortingExpression[] SortingExpression1
{
get
{
if (this._sortingExpression1 == null)
{
var sortingExpression1 = new IgbSortingExpression[7];
var sortingExpression2 = new IgbSortingExpression();
sortingExpression2.Dir = SortingDirection.Asc;
sortingExpression2.FieldName = "ID";
sortingExpression2.IgnoreCase = true;
sortingExpression1[0] = sortingExpression2;
var sortingExpression3 = new IgbSortingExpression();
sortingExpression3.Dir = SortingDirection.Desc;
sortingExpression3.FieldName = "Name";
sortingExpression3.IgnoreCase = true;
sortingExpression1[1] = sortingExpression3;
var sortingExpression4 = new IgbSortingExpression();
sortingExpression4.Dir = SortingDirection.Asc;
sortingExpression4.FieldName = "Category";
sortingExpression4.IgnoreCase = true;
sortingExpression1[2] = sortingExpression4;
var sortingExpression5 = new IgbSortingExpression();
sortingExpression5.Dir = SortingDirection.Asc;
sortingExpression5.FieldName = "OrderDate";
sortingExpression5.IgnoreCase = true;
sortingExpression1[3] = sortingExpression5;
var sortingExpression6 = new IgbSortingExpression();
sortingExpression6.Dir = SortingDirection.Asc;
sortingExpression6.FieldName = "Price";
sortingExpression6.IgnoreCase = true;
sortingExpression1[4] = sortingExpression6;
var sortingExpression7 = new IgbSortingExpression();
sortingExpression7.Dir = SortingDirection.Asc;
sortingExpression7.FieldName = "Units";
sortingExpression7.IgnoreCase = true;
sortingExpression1[5] = sortingExpression7;
var sortingExpression8 = new IgbSortingExpression();
sortingExpression8.Dir = SortingDirection.Asc;
sortingExpression8.FieldName = "Delivered";
sortingExpression8.IgnoreCase = true;
sortingExpression1[6] = sortingExpression8;
this._sortingExpression1 = sortingExpression1;
}
return this._sortingExpression1;
}
}
private IgbColumn column1;
private IgbColumnPipeArgs _columnPipeArgs1 = null;
public IgbColumnPipeArgs ColumnPipeArgs1
{
get
{
if (this._columnPipeArgs1 == null)
{
var columnPipeArgs1 = new IgbColumnPipeArgs();
columnPipeArgs1.CurrencyCode = "USD";
columnPipeArgs1.DigitsInfo = "1.2-2";
this._columnPipeArgs1 = columnPipeArgs1;
}
return this._columnPipeArgs1;
}
}

private OrdersTreeData _ordersTreeData = null;
public OrdersTreeData OrdersTreeData
{
get
{
if (_ordersTreeData == null)
{
_ordersTreeData = new OrdersTreeData();
}
return _ordersTreeData;
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.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.Trial" Version="23.2.38" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.25" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
</ItemGroup>

</Project>
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
Loading

0 comments on commit 8bf27f9

Please sign in to comment.