- @if (users != null && columns != null)
+ @if (users != null)
{
+ class="grid-lite-sample">
+
+
+
+
+
}
@@ -28,43 +32,12 @@
@code {
private List
users;
- private List columns;
private List eventLogs = new List();
protected override void OnInitialized()
{
// Generate 50 users
users = MockDataGenerator.CreateUsers(50);
-
- columns = new List
- {
- new IgbColumnConfiguration
- {
- Key = nameof(User.FirstName),
- HeaderText = "First name",
- Filter = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.LastName),
- HeaderText = "Last name",
- Filter = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Age),
- HeaderText = "Age",
- Type = GridLiteColumnDataType.Number,
- Filter = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Active),
- HeaderText = "Active",
- Type = GridLiteColumnDataType.Boolean,
- Filter = true
- }
- };
}
private void HandleFiltering(IgbGridLiteFilteringEventArgs e)
diff --git a/samples/grids/grid-lite/filtering-config-events/BlazorClientApp.csproj b/samples/grids/grid-lite/filtering-config-events/BlazorClientApp.csproj
index 527fc7b36..f108894fe 100644
--- a/samples/grids/grid-lite/filtering-config-events/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/filtering-config-events/BlazorClientApp.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/grids/grid-lite/filtering-config/App.razor b/samples/grids/grid-lite/filtering-config/App.razor
index 3c6b6ff4b..e9e89c76b 100644
--- a/samples/grids/grid-lite/filtering-config/App.razor
+++ b/samples/grids/grid-lite/filtering-config/App.razor
@@ -9,55 +9,25 @@
- @if (users != null && columns != null)
+ @if (users != null)
{
+ class="grid-lite-sample">
+
+
+
+
+
}
@code {
private List users;
- private List columns;
protected override void OnInitialized()
{
// Generate 50 users
users = MockDataGenerator.CreateUsers(50);
-
- columns = new List
- {
- new IgbColumnConfiguration
- {
- Key = nameof(User.FirstName),
- HeaderText = "First name",
- Filter = new IgbColumnFilterConfiguration
- {
- CaseSensitive = true
- }
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.LastName),
- HeaderText = "Last name",
- Filter = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Age),
- HeaderText = "Age",
- Type = GridLiteColumnDataType.Number,
- Filter = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Active),
- HeaderText = "Active",
- Type = GridLiteColumnDataType.Boolean,
- Filter = true
- }
- };
}
}
\ No newline at end of file
diff --git a/samples/grids/grid-lite/filtering-config/BlazorClientApp.csproj b/samples/grids/grid-lite/filtering-config/BlazorClientApp.csproj
index 527fc7b36..f108894fe 100644
--- a/samples/grids/grid-lite/filtering-config/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/filtering-config/BlazorClientApp.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/grids/grid-lite/overview/App.razor b/samples/grids/grid-lite/overview/App.razor
index 2680dbd5b..6a2c30757 100644
--- a/samples/grids/grid-lite/overview/App.razor
+++ b/samples/grids/grid-lite/overview/App.razor
@@ -5,86 +5,29 @@
- @if (users != null && columns != null)
+ @if (users != null)
{
+ Data="@users"
+ class="grid-lite-sample">
+
+
+
+
+
+
+
+
+
}
@code {
private List users;
- private List columns;
protected override void OnInitialized()
{
// Generate 1000 users like in the original sample
users = MockDataGenerator.CreateUsers(1000);
-
- columns = new List
- {
- new IgbColumnConfiguration
- {
- Key = nameof(User.Avatar),
- HeaderText = "Avatar",
- Width = "100px",
- Hidden = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.FirstName),
- HeaderText = "First name",
- Sort = true,
- Filter = true,
- Resizable = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.LastName),
- HeaderText = "Last name",
- Sort = true,
- Filter = true,
- Resizable = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Email),
- HeaderText = "Email Address",
- Type = GridLiteColumnDataType.String
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Priority),
- HeaderText = "Priority",
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Satisfaction),
- HeaderText = "Satisfaction rating",
- Type = GridLiteColumnDataType.Number,
- Sort = true,
- Filter = true,
- Width = "180px"
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.RegisteredAt),
- HeaderText = "Registered @",
- Type = GridLiteColumnDataType.Date,
- Sort = true,
- Width = "180px"
- },
- new IgbColumnConfiguration
- {
- Key = nameof(User.Active),
- Type = GridLiteColumnDataType.Boolean,
- HeaderText = "Active",
- Width = "100px"
- }
- };
}
}
diff --git a/samples/grids/grid-lite/overview/BlazorClientApp.csproj b/samples/grids/grid-lite/overview/BlazorClientApp.csproj
index 527fc7b36..f108894fe 100644
--- a/samples/grids/grid-lite/overview/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/overview/BlazorClientApp.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/grids/grid-lite/sort-config-events/App.razor b/samples/grids/grid-lite/sort-config-events/App.razor
index 85cd9f691..f775b446e 100644
--- a/samples/grids/grid-lite/sort-config-events/App.razor
+++ b/samples/grids/grid-lite/sort-config-events/App.razor
@@ -5,14 +5,19 @@
- @if (products != null && columns != null)
+ @if (products != null)
{
+ class="grid-lite-sample">
+
+
+
+
+
+
}
@@ -28,55 +33,11 @@
@code {
private List
products;
- private List columns;
private List eventLogs = new List();
protected override void OnInitialized()
{
products = MockDataGenerator.CreateProducts(50);
-
- columns = new List
- {
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Name),
- HeaderText = "Product Name",
- Type = GridLiteColumnDataType.String,
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Price),
- HeaderText = "Price",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Sold),
- HeaderText = "Units sold",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Total),
- HeaderText = "Total sold",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Rating),
- HeaderText = "Customer rating",
- Type = GridLiteColumnDataType.Number,
- Width = "180px",
- Sort = true
- }
- };
}
private void HandleSorting(IgbGridLiteSortingEventArgs e)
diff --git a/samples/grids/grid-lite/sort-config-events/BlazorClientApp.csproj b/samples/grids/grid-lite/sort-config-events/BlazorClientApp.csproj
index 527fc7b36..f108894fe 100644
--- a/samples/grids/grid-lite/sort-config-events/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/sort-config-events/BlazorClientApp.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/grids/grid-lite/sort-config-grid/App.razor b/samples/grids/grid-lite/sort-config-grid/App.razor
index 2e04a2472..f2b3502c3 100644
--- a/samples/grids/grid-lite/sort-config-grid/App.razor
+++ b/samples/grids/grid-lite/sort-config-grid/App.razor
@@ -12,88 +12,45 @@
- @if (products != null && columns != null)
+ @if (products != null)
{
-
+
+
+
+
+
+
+
}
@code {
private List products;
- private List columns;
- private IgbGridLiteSortConfiguration sortConfig;
+ private IgbGridLiteSortingOptions sortingOptions;
protected override void OnInitialized()
{
products = MockDataGenerator.CreateProducts(50);
// Grid-level sort configuration
- sortConfig = new IgbGridLiteSortConfiguration
+ sortingOptions = new IgbGridLiteSortingOptions
{
- Multiple = true, // Enable multi-column sorting
- TriState = true // Enable tri-state sorting (asc -> desc -> none)
+ Mode = GridLiteSortingMode.Multiple // Enable multi-column sorting
};
-
- columns = new List
-{
-new IgbColumnConfiguration
-{
-Key = nameof(ProductInfo.Name),
-HeaderText = "Product Name",
-Type = GridLiteColumnDataType.String,
-Sort = true
-},
-new IgbColumnConfiguration
-{
-Key = nameof(ProductInfo.Price),
-HeaderText = "Price",
-Type = GridLiteColumnDataType.Number,
-Width = "150px",
-Sort = true
-},
-new IgbColumnConfiguration
-{
-Key = nameof(ProductInfo.Sold),
-HeaderText = "Units sold",
-Type = GridLiteColumnDataType.Number,
-Width = "150px",
-Sort = true
-},
-new IgbColumnConfiguration
-{
-Key = nameof(ProductInfo.Total),
-HeaderText = "Total sold",
-Type = GridLiteColumnDataType.Number,
-Width = "150px",
-Sort = true
-},
-new IgbColumnConfiguration
-{
-Key = nameof(ProductInfo.Rating),
-HeaderText = "Customer rating",
-Type = GridLiteColumnDataType.Number,
-Width = "180px",
-Sort = true
-}
-};
}
private void MultiSortChanged(IgbCheckboxChangeEventArgs e)
{
- sortConfig = new IgbGridLiteSortConfiguration
+ sortingOptions = new IgbGridLiteSortingOptions
{
- Multiple = e.Detail.Checked,
- TriState = sortConfig.TriState
+ Mode = e.Detail.Checked ? GridLiteSortingMode.Multiple : GridLiteSortingMode.Single
};
}
private void TriStateChanged(IgbCheckboxChangeEventArgs e)
{
- sortConfig = new IgbGridLiteSortConfiguration
- {
- Multiple = sortConfig.Multiple,
- TriState = e.Detail.Checked
- };
+ // Tri-state sorting is now always enabled, so this handler can be removed or left as no-op
+ // Keeping it for backwards compatibility with the UI switch
}
}
\ No newline at end of file
diff --git a/samples/grids/grid-lite/sort-config-grid/BlazorClientApp.csproj b/samples/grids/grid-lite/sort-config-grid/BlazorClientApp.csproj
index d3edb0811..6702c837b 100644
--- a/samples/grids/grid-lite/sort-config-grid/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/sort-config-grid/BlazorClientApp.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/samples/grids/grid-lite/sort-config-sample/App.razor b/samples/grids/grid-lite/sort-config-sample/App.razor
index a419adeeb..1ac0af181 100644
--- a/samples/grids/grid-lite/sort-config-sample/App.razor
+++ b/samples/grids/grid-lite/sort-config-sample/App.razor
@@ -5,65 +5,26 @@
- @if (products != null && columns != null)
+ @if (products != null)
{
+ Data="@products"
+ class="grid-lite-sample">
+
+
+
+
+
+
}
@code {
private List products;
- private List columns;
protected override void OnInitialized()
{
// Generate 50 products
products = MockDataGenerator.CreateProducts(50);
-
- columns = new List
- {
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Name),
- HeaderText = "Product Name",
- Type = GridLiteColumnDataType.String,
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Price),
- HeaderText = "Price",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Sold),
- HeaderText = "Units sold",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Total),
- HeaderText = "Total sold",
- Type = GridLiteColumnDataType.Number,
- Width = "150px",
- Sort = true
- },
- new IgbColumnConfiguration
- {
- Key = nameof(ProductInfo.Rating),
- HeaderText = "Customer rating",
- Type = GridLiteColumnDataType.Number,
- Width = "180px",
- Sort = true
- }
- };
}
}
diff --git a/samples/grids/grid-lite/sort-config-sample/BlazorClientApp.csproj b/samples/grids/grid-lite/sort-config-sample/BlazorClientApp.csproj
index 527fc7b36..f108894fe 100644
--- a/samples/grids/grid-lite/sort-config-sample/BlazorClientApp.csproj
+++ b/samples/grids/grid-lite/sort-config-sample/BlazorClientApp.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/grids/grid-lite/styling-config-themes/App.razor b/samples/grids/grid-lite/styling-config-themes/App.razor
index 56229bac3..8ac278e2e 100644
--- a/samples/grids/grid-lite/styling-config-themes/App.razor
+++ b/samples/grids/grid-lite/styling-config-themes/App.razor
@@ -21,66 +21,27 @@
- @if (products != null && columns != null)
+ @if (products != null)
{
+ Data="@products"
+ class="grid-lite-sample">
+
+
+
+
+
+
}
@code {
private List