Skip to content

Commit

Permalink
Adding changes from build igniteui-xplat-examples-output+PRs_2024.6.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsbuild committed Jun 5, 2024
1 parent c2193b4 commit 8164b40
Show file tree
Hide file tree
Showing 35 changed files with 1,777 additions and 39 deletions.
1 change: 1 addition & 0 deletions samples/grids/tree-grid/cell-selection-mode/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
PropertyPath="CellSelection"
Name="CellSelectionEditor"
@ref="cellSelectionEditor"
Label="Cell Selection"
ValueType="PropertyEditorValueType.EnumValue"
DropDownNames="@(new string[] { "None", "Single", "Multiple" })"
DropDownValues="@(new string[] { "None", "Single", "Multiple" })">
Expand Down
44 changes: 29 additions & 15 deletions samples/grids/tree-grid/conditional-cell-style-1/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,56 @@
Name="treeGrid"
@ref="treeGrid"
Id="treeGrid"
Data="FoodsData"
Data="OrdersTreeData"
PrimaryKey="ID"
ForeignKey="ParentID">
<IgbColumn
Field="ID"
Header="Product ID"
Header="Order ID"
DataType="GridColumnDataType.String">
</IgbColumn>

<IgbColumn
Field="Name"
Header="Product Name"
Header="Order Product"
DataType="GridColumnDataType.String"
BodyTemplateScript="WebTreeGridProductNameTemplate"
CellClassesScript="WebTreeGridAllergensCellClassesHandler"
Name="column1"
@ref="column1">
</IgbColumn>

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

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

<IgbColumn
Field="UnitPrice"
Header="Unit Price"
DataType="GridColumnDataType.Number"
BodyTemplateScript="WebTreeGridUnitPriceTemplate"
DataType="GridColumnDataType.Currency"
CellClassesScript="WebTreeGridUnitPriceCellClassesHandler"
Name="column2"
@ref="column2">
</IgbColumn>

<IgbColumn
Field="AddedDate"
Header="Added Date"
Field="Price"
DataType="GridColumnDataType.Currency">
</IgbColumn>

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

<IgbColumn
Field="Discontinued"
Header="Discontinued"
Field="Delivered"
DataType="GridColumnDataType.Boolean">
</IgbColumn>

Expand All @@ -66,16 +80,16 @@
private IgbColumn column1;
private IgbColumn column2;

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

Expand Down
286 changes: 286 additions & 0 deletions samples/grids/tree-grid/conditional-cell-style-1/OrdersTreeData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
using System;
using System.Collections.Generic;
public class OrdersTreeDataItem
{
public double ID { get; set; }
public double ParentID { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public string OrderDate { get; set; }
public double Units { get; set; }
public double UnitPrice { get; set; }
public double Price { get; set; }
public bool Delivered { get; set; }
}

public class OrdersTreeData
: List<OrdersTreeDataItem>
{
public OrdersTreeData()
{
this.Add(new OrdersTreeDataItem()
{
ID = 1,
ParentID = -1,
Name = @"Order 1",
Category = @"",
OrderDate = @"2010-02-17",
Units = 1844,
UnitPrice = 3.73,
Price = 6884.38,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 101,
ParentID = 1,
Name = @"Chocolate Chip Cookies",
Category = @"Cookies",
OrderDate = @"2010-02-17",
Units = 834,
UnitPrice = 3.59,
Price = 2994.06,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 102,
ParentID = 1,
Name = @"Red Apples",
Category = @"Fruit",
OrderDate = @"2010-02-17",
Units = 371,
UnitPrice = 3.66,
Price = 1357.86,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 103,
ParentID = 1,
Name = @"Butter",
Category = @"Diary",
OrderDate = @"2010-02-17",
Units = 260,
UnitPrice = 3.45,
Price = 897,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 104,
ParentID = 1,
Name = @"Potato Chips",
Category = @"Snack",
OrderDate = @"2010-02-17",
Units = 118,
UnitPrice = 1.96,
Price = 231.28,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 105,
ParentID = 1,
Name = @"Orange Juice",
Category = @"Beverages",
OrderDate = @"2010-02-17",
Units = 261,
UnitPrice = 5.38,
Price = 1404.18,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 2,
ParentID = -1,
Name = @"Order 2",
Category = @"",
OrderDate = @"2022-05-27",
Units = 1831,
UnitPrice = 8.23,
Price = 15062.77,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 201,
ParentID = 2,
Name = @"Frozen Shrimps",
Category = @"Seafood",
OrderDate = @"2022-05-27",
Units = 120,
UnitPrice = 20.45,
Price = 2454,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 202,
ParentID = 2,
Name = @"Ice Tea",
Category = @"Beverages",
OrderDate = @"2022-05-27",
Units = 840,
UnitPrice = 7,
Price = 5880,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 203,
ParentID = 2,
Name = @"Fresh Cheese",
Category = @"Diary",
OrderDate = @"2022-05-27",
Units = 267,
UnitPrice = 16.55,
Price = 4418.85,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 204,
ParentID = 2,
Name = @"Carrots",
Category = @"Vegetables",
OrderDate = @"2022-05-27",
Units = 360,
UnitPrice = 2.77,
Price = 997.2,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 205,
ParentID = 2,
Name = @"Apple Juice",
Category = @"Beverages",
OrderDate = @"2022-05-27",
Units = 244,
UnitPrice = 5.38,
Price = 1312.72,
Delivered = false
});
this.Add(new OrdersTreeDataItem()
{
ID = 3,
ParentID = -1,
Name = @"Order 3",
Category = @"",
OrderDate = @"2022-08-04",
Units = 1972,
UnitPrice = 3.47,
Price = 6849.18,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 301,
ParentID = 3,
Name = @"Skimmed Milk 1L",
Category = @"Diary",
OrderDate = @"2022-08-04",
Units = 1028,
UnitPrice = 3.56,
Price = 3659.68,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 302,
ParentID = 3,
Name = @"Bananas 5 Pack",
Category = @"Fruit",
OrderDate = @"2022-08-04",
Units = 370,
UnitPrice = 6.36,
Price = 2353.2,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 303,
ParentID = 3,
Name = @"Cauliflower",
Category = @"Vegetables",
OrderDate = @"2022-08-04",
Units = 283,
UnitPrice = 0.95,
Price = 268.85,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 304,
ParentID = 3,
Name = @"White Chocolate Cookies",
Category = @"Cookies",
OrderDate = @"2022-08-04",
Units = 291,
UnitPrice = 1.95,
Price = 567.45,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 4,
ParentID = -1,
Name = @"Order 4",
Category = @"",
OrderDate = @"2023-01-04",
Units = 1065,
UnitPrice = 5.56,
Price = 5923.5,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 401,
ParentID = 4,
Name = @"Mini Milk Chocolate Cookie Bites",
Category = @"Cookies",
OrderDate = @"2023-01-04",
Units = 68,
UnitPrice = 2.25,
Price = 153,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 402,
ParentID = 4,
Name = @"Wild Salmon Fillets",
Category = @"Seafood",
OrderDate = @"2023-01-04",
Units = 320,
UnitPrice = 16.15,
Price = 5168,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 403,
ParentID = 4,
Name = @"Diet Lemonade",
Category = @"Beverages",
OrderDate = @"2023-01-04",
Units = 437,
UnitPrice = 0.5,
Price = 218.5,
Delivered = true
});
this.Add(new OrdersTreeDataItem()
{
ID = 404,
ParentID = 4,
Name = @"Potatoes",
Category = @"Vegetables",
OrderDate = @"2023-01-04",
Units = 240,
UnitPrice = 1.6,
Price = 384,
Delivered = true
});
}
}
2 changes: 0 additions & 2 deletions samples/grids/tree-grid/conditional-cell-style-1/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public static async Task Main(string[] args)
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbInputModule),
typeof(IgbPropertyEditorPanelModule),
typeof(IgbTreeGridModule)
);
await builder.Build().RunAsync();
Expand Down
Loading

0 comments on commit 8164b40

Please sign in to comment.