Skip to content

Commit 2249d1c

Browse files
Update to 25.1.3+
1 parent 1076aad commit 2249d1c

20 files changed

+1329
-26
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Net;
5+
using System.Net.Http;
6+
using DropDownBoxWithTagBox.Models;
7+
using DevExtreme.AspNet.Data;
8+
using DevExtreme.AspNet.Mvc;
9+
using Microsoft.AspNetCore.Mvc;
10+
11+
namespace DropDownBoxWithTagBox.Controllers {
12+
13+
[Route("api/[controller]")]
14+
public class SampleDataController : Controller {
15+
16+
[HttpGet]
17+
public object Get(DataSourceLoadOptions loadOptions) {
18+
return DataSourceLoader.Load(SampleData.Orders, loadOptions);
19+
}
20+
21+
}
22+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Linq;
3+
using System.Collections.Generic;
4+
using System.Net.Http;
5+
using Microsoft.AspNetCore.Mvc;
6+
using DevExtreme.AspNet.Mvc;
7+
using DevExtreme.AspNet.Data;
8+
using DevExtreme.NETCore.Demos.Models.SampleData;
9+
10+
namespace DevExtreme.NETCore.Demos.Controllers.ApiControllers
11+
{
12+
[Route("api/[controller]")]
13+
public class TreeViewPlainDataController : Controller
14+
{
15+
[HttpGet]
16+
public object Get(DataSourceLoadOptions loadOptions)
17+
{
18+
return DataSourceLoader.Load(TreeViewPlainData.Products, loadOptions);
19+
}
20+
}
21+
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
namespace DevExtreme.NETCore.Demos.Models.SampleData
6+
{
7+
public static class TreeViewPlainData
8+
{
9+
public static readonly IEnumerable<Product> Products = new[] {
10+
new Product {
11+
ID = "1",
12+
Text = "Stores",
13+
Expanded = true
14+
},
15+
new Product {
16+
ID = "1_1",
17+
CategoryId = "1",
18+
Text = "Super Mart of the West",
19+
Expanded = true
20+
},
21+
new Product {
22+
ID = "1_1_1",
23+
CategoryId = "1_1",
24+
Text = "Video Players"
25+
},
26+
new Product {
27+
ID = "1_1_1_1",
28+
CategoryId = "1_1_1",
29+
Text = "HD Video Player",
30+
Image = "../../images/ProductsLarge/1.png",
31+
Price = 220
32+
},
33+
new Product {
34+
ID = "1_1_1_2",
35+
CategoryId = "1_1_1",
36+
Text = "SuperHD Video Player",
37+
Image = "../../images/ProductsLarge/2.png",
38+
Price = 270
39+
},
40+
new Product {
41+
ID = "1_1_2",
42+
CategoryId = "1_1",
43+
Text = "Televisions",
44+
Expanded = true
45+
},
46+
new Product {
47+
ID = "1_1_2_1",
48+
CategoryId = "1_1_2",
49+
Text = "SuperLCD 42",
50+
Image = "../../images/ProductsLarge/7.png",
51+
Price = 1200
52+
},
53+
new Product {
54+
ID = "1_1_2_2",
55+
CategoryId = "1_1_2",
56+
Text = "SuperLED 42",
57+
Image = "../../images/ProductsLarge/5.png",
58+
Price = 1450
59+
},
60+
new Product {
61+
ID = "1_1_2_3",
62+
CategoryId = "1_1_2",
63+
Text = "SuperLED 50",
64+
Image = "../../images/ProductsLarge/4.png",
65+
Price = 1600
66+
},
67+
new Product {
68+
ID = "1_1_2_4",
69+
CategoryId = "1_1_2",
70+
Text = "SuperLCD 55",
71+
Image = "../../images/ProductsLarge/6.png",
72+
Price = 1750
73+
},
74+
new Product {
75+
ID = "1_1_2_5",
76+
CategoryId = "1_1_2",
77+
Text = "SuperLCD 70",
78+
Image = "../../images/ProductsLarge/9.png",
79+
Price = 4000
80+
},
81+
new Product {
82+
ID = "1_1_3",
83+
CategoryId = "1_1",
84+
Text = "Monitors"
85+
},
86+
new Product {
87+
ID = "1_1_3_1",
88+
CategoryId = "1_1_3",
89+
Text = "19\""
90+
},
91+
new Product {
92+
ID = "1_1_3_1_1",
93+
CategoryId = "1_1_3_1",
94+
Text = "DesktopLCD 19",
95+
Image = "../../images/ProductsLarge/10.png",
96+
Price = 160
97+
},
98+
new Product {
99+
ID = "1_1_4",
100+
CategoryId = "1_1",
101+
Text = "Projectors"
102+
},
103+
new Product {
104+
ID = "1_1_4_1",
105+
CategoryId = "1_1_4",
106+
Text = "Projector Plus",
107+
Image = "../../images/ProductsLarge/14.png",
108+
Price = 550
109+
},
110+
new Product {
111+
ID = "1_1_4_2",
112+
CategoryId = "1_1_4",
113+
Text = "Projector PlusHD",
114+
Image = "../../images/ProductsLarge/15.png",
115+
Price = 750
116+
}
117+
};
118+
}
119+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
namespace DevExtreme.NETCore.Demos.Models
6+
{
7+
public class Product
8+
{
9+
public string ID { get; set; }
10+
public string CategoryId { get; set; }
11+
public string Text { get; set; }
12+
public bool Expanded { get; set; }
13+
public IEnumerable<Product> Items { get; set; }
14+
public int Price { get; set; }
15+
public string Image { get; set; }
16+
}
17+
}

0 commit comments

Comments
 (0)